From: Norman V. <nh...@ca...> - 2001-08-31 23:14:25
|
BERNDT, JON S. (JON) (JSC-EX) (LM) > >Could someone with a Linux box, someone with MSVC, IRIX, etc. >check to see >if this: > >_IO_ostream_withassign > >is defined in your iostream.h file or somewhere else (or even at all)? > Easiest to test this little program This works with MSVC 6.0 sp4 and gcc 2.95.3 libstdc++3 don't know about libstdc++2 and/or earlier gcc's < Bernie ?? > Cheers Norman ====== cut ======== #include <fstream.h> #ifdef _MSC_VER #define FG_IOSTREAM_WITH_ASSIGN ostream_withassign #elif defined(__GNUC__) #define FG_IOSTREAM_WITH_ASSIGN _IO_ostream_withassign #else error port_me #endif int main() { ofstream datafile("jnk"); FG_IOSTREAM_WITH_ASSIGN myStream; if (datafile) { myStream = datafile; myStream << "testing datafile" << endl; myStream = cout; myStream << "testing cout" << endl; datafile.close(); } } |