Re: include <strstream.h> --- ostrstream

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 03, 2003 at 01:50:10PM +0530, Ajay Bansal wrote:
> Hi All
> 
> My code is using following (code is old)
> 
> include/SmDefs.h:#include <strstream.h>
> include/SmDefs.h:       ostrstream logstream(pData, MSGLEN); 
> 
> 
> I am compiling it with gcc 3.2.1.. I get the following warning
> 
> /usr/local/include/c++/3.2.1/backward/backward_warning.h:32:2: warning:
> #warning This file includes at least one deprecated or antiquated
> header. Please consider using one of the 32 headers found in section
> 17.4.1.2 of the C++ standard. Examples include substituting the <X>
> header for the <X.h> header for C++ includes, or <sstream> instead of
> the deprecated header <strstream.h>. To disable this warning use
> -Wno-deprecated.
> 
> 
> Now my question is::
> In latest g++, what should be used instead of strstream/ostrstream , so
> that code becomes correct. (I would like to have minimum changes in the
> code).

Please, just (re-)read the warning message. Especially the part about
"the deprecated header <strstream.h>" which should be substituted by
<sstream>. How can it be more obvious?

-- 
Claudio Bley                                 ASCII ribbon campaign (")
Debian GNU/Linux user                         - against HTML email  X 
http://www.cs.uni-magdeburg.de/~bley/                     & vCards / \


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux