stupid g++ question
Jonathan Arnold
jdarnold at buddydog.org
Thu Mar 14 15:04:40 EST 2002
>There are better ways of doing this, but the addition of using namespace
>std; solves the problem.
Another one is to just add std:: in front of cout & string, to make it
std::cout and std::string.
>Apparently, Red Hat 7.2 (gcc 2.96) solves this either as a compiler
>default or by altering the header files.
Sometimes, when you add the '.h' to the include name, it is an ad hoc
standard to put everything into the global namespace. You really should
be including <iostream>, not <iostream.h>. Probably later versions don't
adhere to this unofficial standard.
--
Jonathan Arnold (mailto:jdarnold at buddydog.org)
Amazing Developments http://www.buddydog.org
There is only one satisfying way to boot a computer.
--J.H.Goldfuss
More information about the Discuss
mailing list