libstdc++/8469: Obsolete iostream.h and fstream.h?

Phil Edwards phil@jaj.com
Tue Nov 5 16:16:00 GMT 2002


The following reply was made to PR libstdc++/8469; it has been noted by GNATS.

From: Phil Edwards <phil@jaj.com>
To: rdnjr@houston.rr.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: libstdc++/8469: Obsolete iostream.h and fstream.h?
Date: Tue, 5 Nov 2002 19:14:03 -0500

 On Tue, Nov 05, 2002 at 09:36:06PM -0000, rdnjr@houston.rr.com wrote:
 > >Description:
 > Compiling any program that includes iostream.h, or fstream.h yields an
 > 'Obsolete header file' warning, but will NOT compile the program.
 
 And the error message is...?  We're not telepathic.
 
 > If I take
 > those includes out and replace cout's with printf's, so on and so forth,
 
 Then you're no longer using the C++ library.
 
 
 > >How-To-Repeat:
 > compile any program with '#include <iostream.h>', and include a 'cout <<' statement in it.
 
 This works for everybody else.
 
 The I/O headers with .h were never part of any language standard, so their
 contents vary from one compiler to another.  We provide them just to help
 in moving old C++ code to correct C++ code.  You may be assuming that a
 .h file provides more than it does.
 
 As a start, try including <foo> instead of <foo.h>, and placing a 'using'
 statement after the header.
 
 
 Phil
 
 -- 
 I would therefore like to posit that computing's central challenge, viz. "How
 not to make a mess of it," has /not/ been met.
                                                  - Edsger Dijkstra, 1930-2002



More information about the Gcc-prs mailing list