Hey all,
Im reading Sams Teach Yourself C++ in 21 Days. Its a good book so far I think. But I think he wrote something wrong.
I am typing in the code exactly as soon on page 18:
And I get the following errors:Code:#include <iostream> int main() { std:cout << "Hello World!\n"; int x; std::cin >> x; return 0; }
--------------------Configuration: Example1 - Win32 Debug--------------------
Compiling...
ex1.cpp
c:\program files\microsoft visual studio\myprojects\example1\ex1.cpp(5) : error C2065: 'cout' : undeclared identifier
c:\program files\microsoft visual studio\myprojects\example1\ex1.cpp(5) : error C2297: '<<' : illegal, right operand has type 'char [14]'
Error executing cl.exe.
Example1.exe - 2 error(s), 0 warning(s)
Can anyone tell me what is wrong? I copied it exactly out of the book. Im using Microsoft Visual C++ 6.0
If you need any other info let me know, thanks in advance to anyone that helps me out.