+ 1

Check the following code ( In the description ) and find the Error

#include <iostream> //using namespace std; //Compiler version g++ 4.9 int main() { std::cout << "Hello" << std::endl << std::cout << "World"; return 0; }

24th Mar 2017, 11:47 AM
cool_boy12344
cool_boy12344 - avatar
3 Antworten
+ 7
You passed a std::cout to another. std::cout<<"Hello"<<std::endl<<"World"; works.
24th Mar 2017, 11:55 AM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 1
that's right
26th Mar 2017, 5:23 PM
Aayush
Aayush - avatar
+ 1
You have not included "using namespace std" which also might be the cause for the error.
27th Mar 2017, 7:35 AM
Vishnu ks
Vishnu ks - avatar