No, std::cout is a variable.Originally Posted by Ewiv
This is a discussion on linked list issues within the C++ Programming forums, part of the General Programming Boards category; Originally Posted by Ewiv std::cout is a function I know this No, std::cout is a variable....
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.
“Salem Was Wrong!” -- Pedant Necromancer
“Quit your job and fork something!” -- Arrogant Tiyanak
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