I recently found a typo in my project which looked like this:
std: cout << "Hello World!" << std::endl;
It was compiling fine, although I noticed that I had a using std::cout
directive in the include chain that was required to prevent a syntax error from cout
being out of scope. I wrote a test program to see what was going on, and it turns out that std:;
is a perfectly valid line of c++. What is std:
doing, and why doesn't it cause syntax errors when combined with the call to cout
?