-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello:

I already asked about this problem on the libstdc++ list, and discovered
that the problem appears to be only with Red Hat's distribution of the
libstdc++ package.  I upgraded the following:

cpp-2.96-74          gcc-g77-2.96-74          gcc-objc-2.96-69
libstdc++-2.96-74    libstdc++-devel-2.96-74  gcc-c++-2.96-74
gcc-2.96-74

(from RPM packages found in the Rawhide directory on Red Hat's FTP site),
but my problem remains, and is described below.

I'm using g++ with libstdc++ 2.96-74 (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)

I have tried including <ios> as was suggested by several people on 
EFNet's #c++ channel, but I get the error, "No such file or directory".  I 
can not find an 'ios' header file.  From the libstdc++ mailing list, I
received a suggestion to try including 'iosfwd', but that doesn't resolve
this compilation error either.

Also, I'm wondering if I'm doing something wrong with stringstream.  While 
this is probably not the proper place to ask, the following code does 
*not* act as I expect:

  int total = 0;
  stringstream ss;
  ss << argv[1];    // Move the command line argument into the string stream
  ss >> total;      // And move it's integer equivalent to total!

I was hoping that the code above would take a numeric command line
argument and convert it to an integer, storing it in total.  Basically,
the "c++ equivalent" of 'total = atoi(argv[1])'.  I was surprised to find
the failbit set.  ;-)  Doing a 'cout << argv[1]' shows a valid numeric
argument, and doing a 'total = atoi(argv[1])' results in a proper
conversion of it to the integer. 

Thank you in advance for your assistance.

- --------------< LINUX: The choice of a GNU generation. >--------------
Steve Frampton    <[EMAIL PROTECTED]>     interQ (Japan), Inc.
Systems Administrator/Software Developer      http://www.interq.or.jp/
GNU Privacy Guard ID: D055EBC5  (see http://www.gnupg.org for details)
GNU-PG Fingerprint: EEFB F03D 29B6 07E8 AF73  EF6A 9A72 F1F5 D055 EBC5

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (SunOS)
Comment: For info see http://www.gnupg.org

iD8DBQE6ihTsmnLx9dBV68URAtLSAJ0bjQ6rTrsWtPpEFb92ogpJ0zvWHQCfZrEH
x2CYCGmkWs/dJ7t39fAt1JQ=
=bG8o
-----END PGP SIGNATURE-----



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to