Here's the code....
#include <iostream>
int main()
{
cout << "WELCOME TO C++ PROGRAMMING";
return 0;
}
And when I go the terminal and pass the command..
g++ hello.cpp
It shows...
hello.cpp: In function ‘int main()’:
hello.cpp:4:2: error: ‘cout’ was not declared in this scope
cout << "WELCOME TO C++ PROGRAMMING";
^
hello.cpp:4:2: note: suggested alternative:
In file included from hello.cpp:1:0:
/usr/include/c++/4.8/iostream:61:18: note: ‘std::cout’
extern ostream cout; /// Linked to standard output
So what's the reason? And what should I do?