Problem with strstream

Sanjay Bhatnagar sanjay@ncra.tifr.res.in
Thu Oct 15 01:44:00 GMT 1998


Hi, 

I compiled egcs-1.1b successfully on IRIX64 machine.  Most it works
except when I compile and run the following program, it gives a
segementation fault at line no. 9.

     #include <strstream.h>
     #include <iostream.h>
     #include <stdio.h>

     main()
      {
         strstream s;
 
         s << "This is a test for strstream" <<ends;
         printf("%s\n",s.str());
      }

As far as I can say, this should work.  It does work with the IRIX CC
compiler.

Same problem crops up on Solaris also.  However on Linux, again it
works fine.

Need some help!  I am testing this statement, because I specifically
need to use it.

Any quick help, comments, pointers for help, etc. will be highly
appreciated.  I did not send a message to egcs@cygnus.com about
successfull installation since I am not sure if the installation is
yet fully successfull.


Regards,
sanjay



More information about the Gcc-bugs mailing list