Okay so I am just beginning C++, im currently reading a book by Jeff Cogswell to teach myself. To write my first program he tells me make a new project, a console, so I did that, he writes to go to line 6:1 and hit space twice(or press end) and then type the message cout << "Hello, I am your computer talking. << endl;. So I did that, however whenever I try to compile it says I have 3 errors, and it does not recognize cout or endl. I have reread and gone over his instructions many times, and I would try to skip this part, but I need to have this working in order for the rest of the project to work.
cout and endl, since the 1998 standard, are in the std namespace. There are two ways to solve your compile errors:
1. This is the one I use: Whenever you're using something from the C++ standard library, put std:: in front of what your trying to use. Your line could be rewritten as std::cout <<"Hello, I am your computer talking." /*<- You forgot to close your quote here. */<<std::endl;
2. Put using namespace std; at the top of your sources. This will assume every time you say "cout" you're referring to "std::cout".