GCC include files conundrum.

M. Warner Losh imp at bsdimp.com
Mon Mar 15 14:19:42 PST 2004


In message: <16468.65270.123954.862565 at canoe.dclg.ca>
            David Gilbert <dgilbert at dclg.ca> writes:
: The C++ FAQ referred to by iostream (not iostream.h) seems to imply
: that you should use iostream and sstream (no .h)... but including
: those files imposes a very different standard that this port is not
: ready to accept.  It appears that (among other things that I havn't
: found yet) all 'istream' must be written 'std::istream' ... etc.
: 
: So what's the solution?

Fix the code.  Use the new, non .h variation.  And put 'using
namespace std;' at the top of your files *OR* fix all the uses to have
std:: in front of them.  That's C++, get used to it. :-)

C++ used to define things differently, but as compilers become more
standards conforming, you'll see more and more things like this.

The old .h files are obsoleted.

Warner


More information about the freebsd-hackers mailing list