This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Where is 'ios'/'ios_base'?
- To: Steve Frampton <frampton at interq dot or dot jp>
- Subject: Re: Where is 'ios'/'ios_base'?
- From: Craig Rodrigues <rodrigc at mediaone dot net>
- Date: Tue, 13 Feb 2001 23:02:04 -0500
- Cc: libstdc++ at gcc dot gnu dot org
- References: <Pine.SUN.4.30.0102140958001.24044@imap.interq.or.jp>
On Wed, Feb 14, 2001 at 09:59:16AM +0900, Steve Frampton wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello:
>
> I'm using g++ with libstdc++ 2.96-69 (courtesy of Red Hat), and I was just
> wondering if the "ios" header file is missing?
>
> I'm using a stringstream with which I'd like to throw an exception if the
> failbit/badbit is set. I have:
>
> #include <iostream>
> #include <sstream>
> using namespace std;
>
> stringstream ss;
> ss.exceptions(ios_base::badbit | ios_base::failbit);
>
> But on compilation I get:
>
> demo.cpp:25: `ios_base' undeclared (first use this function)
This error does not occur with the version of gcc in CVS.
You may wish to upgrade your compiler (2.96-74 is the latest from Redhat).
If you do:
rpm -ql libstdc++
rpm -ql libstdc++-devel
This will list the libraries and header files that came with your
Redhat distribution of the Standard C++ library. It looks
like the Redhat distribution does not come with <ios>, but
it does come with <iosfwd>. You can try that.
For general C++ questions, it is best to post them to the newsgroup
comp.lang.c++.moderated.
--
Craig Rodrigues
http://www.gis.net/~craigr
rodrigc@mediaone.net