ostrstream problem
Peter Doerfler
doerfler@techinfo.rwth-aachen.de
Wed Sep 28 07:36:00 GMT 2005
Hi Ernest.
"strstream has been deprecated in the C++98 standard because the standards
committee felt it was superseded by stringstream, which better encapsulates
memory management. strstream is still an official part of the standard that
conforming C++ implementers must provide."
[distilled from Herb Sutter's http://www.gotw.ca/publications/mill19.htm]
So you can either use ostringstream or include backward/strstream (found by
grep). Note that I haven't checked if the ostrstream now in backward is the
same that used to be in the general include directory in previous versions.
HTH, Peter
On Wednesday 28 September 2005 05:00, Ernest L. Williams Jr. wrote:
> Hi,
>
> I am now using gcc 4.0.1.
>
> I get the following error:
> ====================================================
> error: ‘ostrstream’ was not declared in this scope
> ===================================================
>
>
> What header must I use to get ostrstream?
>
> I tried : #include <sstream>
>
> I am confused.
> Any help or reference is welcomed and appreciated.
>
>
>
> Thanks,
> Ernest L. Williams Jr.
More information about the Gcc-help
mailing list