Error in C++

Closed
zib@zib Posts 277 Registration date Tuesday September 25, 2007 Status Member Last seen July 24, 2013 - Dec 5, 2009 at 07:45 AM
 Blocked Profile - Dec 6, 2009 at 03:19 AM
Hello,
Hello,
please help me understand why this error ?, am doing exercise .i got this code from my book but it tells me that i have this error C2065: 'cout' : undeclared identifier

look at my code




#include

int main ()
{
cout << "Hello World!\n";
return 0;
}


am using Visual Studio 2005

1 response

Blocked Profile
Dec 6, 2009 at 03:19 AM
Dear Sir,

You should make use of the input and output stream from the library as follows

"#include <iostream.h>" and also you should add the return command at the end,

that is "return 0".

Thanks in advance.
0