a quick ofstream question
Igor Markov
imarkov@cs.ucla.edu
Tue Aug 24 18:16:00 GMT 1999
Hello,
while porting code from CC4.2 to g++2.95(.1), I noticed that
ofstream("filename") << myVar;
does not compile (an overloaded op<< is assumed).
ofstream ofs1("filename");
ofs1 << myVar;
works fine.
It is conceivable that g++ does not want to apply a non-const
op<< to a temporary, but I was wondering if this is according
to the C++ standard (if not, does V3 allow this).
thanks,
Igor
--
Igor Markov office: (310) 206-0179
http://vlsicad.cs.ucla.edu/~imarkov
More information about the Libstdc++
mailing list