No, std::cout is a variable.Originally Posted by Ewiv
No, std::cout is a variable.Originally Posted by Ewiv
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
O_oOn a side note, stop using: I don't understand why books insist in teaching students this terrible practice.
So instead you spread the opposite advice which equally awful?
Without using directives, `namespace' would be no different than any label affix as you'd use in C with macro segments.
Soma
“Salem Was Wrong!” -- Pedant Necromancer
“Four isn't random!” -- Gibbering Mouther
More precisely, std::cout is an object variable of type std::ostream. An example of a related function is std::cout.flush().
As for the using namespace std directive, the real mistake there is to put it into a header file at global scope. That should be avoided since it forces it on the user of the header.
The cost of software maintenance increases with the square of the programmer's creativity. - Robert D. Bliss