Search code examples
c++headermingwsstream

using sstream in mingw 2.95 compiler


Is it possible to use sstream header in mingw 2.95 compiler?.If, it is, then how? I am using C-Free 4.0 and it comes with default mingw2.95 and cygwin compiler


Solution

  • g++ 2.95 is really from the stone age. There was no <sstream> at that time. (A lot of other things are missing too or don't work like they do in more recent compilers.) It comes only with the obsolete <strstream> which is based on char*.

    Your options are:

    • Get a newer compiler. Almost anything newer will do.
    • If you are really forced to use this one for some reason, you can copy sstream from gcc 3.x. That worked for me at that time. But be prepared for more surprises.
    • Stick with strstream but that's ugly...