This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ostrstream problem


Hi Ernest,

I second what Peter said.

Plus....

You should be aware in switching from ostrstream to std::ostringstream...

std::ostringstream does the memory management for you.  You don't need to
trouble yourself with ostrstream's memory management burden.  That alone is
worth switching instead of trying to use the obsolete ostrstream!

std::ostringstream's backing store is a std::string, so you don't need the
ends terminator.

Sincerely,
--Eljay


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]