I'm temporarily using gcc 2.95.2, and instead of having a sstream
header, it defines a (slightly different, and deprecated) strstream
. I'm currently getting around this with
#if __GNUC__ < 3 // or whatever version number it changes
#include <strstream>
#else
#include <sstream>
#endif
and then things like:
#if __GNUC__ < 3
strstream str;
str << "Hello World";
#else
stringstream str("Hello World");
#endif
but it's getting really annoying. I just want to make sure that when I switch back to a more recent gcc (or some other compiler), I don't have to rewrite these passages. Any thoughts?