This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: ostrstream problem
- From: Peter Doerfler <doerfler at techinfo dot rwth-aachen dot de>
- To: gcc-help at gcc dot gnu dot org, ernesto at ornl dot gov
- Date: Wed, 28 Sep 2005 09:34:42 +0200
- Subject: Re: ostrstream problem
- References: <1127876423.25951.19.camel@localhost.localdomain>
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.