public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: include <strstream.h> --- ostrstream
@ 2003-07-03  9:45 Ajay Bansal
  2003-07-03 13:49 ` John Love-Jensen
  0 siblings, 1 reply; 6+ messages in thread
From: Ajay Bansal @ 2003-07-03  9:45 UTC (permalink / raw)
  To: m., gcc-help

Thanks.. :)
One more question..

stringstream does not have anything for MSGLEN.. Rite?? pData length is
not defined... Rite???


-----Original Message-----
From: m. [mailto:michal017@centrum.sk] 
Sent: Thursday, July 03, 2003 2:32 PM
To: gcc-help@gcc.gnu.org

use stringstream class and <sstream> header m.

On Thu, 3 Jul 2003 13:50:10 +0530
"Ajay Bansal" <Ajay_Bansal@infosys.com> 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).
>
>
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: include <strstream.h> --- ostrstream
  2003-07-03  9:45 include <strstream.h> --- ostrstream Ajay Bansal
@ 2003-07-03 13:49 ` John Love-Jensen
  0 siblings, 0 replies; 6+ messages in thread
From: John Love-Jensen @ 2003-07-03 13:49 UTC (permalink / raw)
  To: Ajay Bansal, m., gcc-help

Hi Ajay,

>stringstream does not have anything for MSGLEN.. Rite?? pData length is not
defined... Rite???

Correct on both counts.

The std::stringstream / std::ostringstream / std::istringstream objects use
a std::string as the backing store, not a char* buffer like strstream.

--Eljay

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: include <strstream.h> --- ostrstream
       [not found] <2B721C6525F0D411B1E900B0D0226BDD02D4B4A0@mohmsg01.ad.infos ys.com>
@ 2003-07-03 11:22 ` Andrea 'fwyzard' Bocci
  0 siblings, 0 replies; 6+ messages in thread
From: Andrea 'fwyzard' Bocci @ 2003-07-03 11:22 UTC (permalink / raw)
  To: Ajay Bansal; +Cc: m., gcc-help

At 15.14 03/07/2003 +0530, Ajay Bansal wrote:
>Thanks.. :)
>One more question..
>
>stringstream does not have anything for MSGLEN.. Rite?? pData length is
>not defined... Rite???

Dunno.
You can have a look at 
<http://www.cplusplus.com/ref/iostream/stringstream/> for some reference on 
stringstream, though.

.fwyzard. 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: include <strstream.h> --- ostrstream
  2003-07-03  8:24 Ajay Bansal
  2003-07-03  9:02 ` m.
@ 2003-07-03  9:07 ` Claudio Bley
  1 sibling, 0 replies; 6+ messages in thread
From: Claudio Bley @ 2003-07-03  9:07 UTC (permalink / raw)
  To: gcc-help

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 / \

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: include <strstream.h> --- ostrstream
  2003-07-03  8:24 Ajay Bansal
@ 2003-07-03  9:02 ` m.
  2003-07-03  9:07 ` Claudio Bley
  1 sibling, 0 replies; 6+ messages in thread
From: m. @ 2003-07-03  9:02 UTC (permalink / raw)
  To: gcc-help

use stringstream class and <sstream> header
m.

On Thu, 3 Jul 2003 13:50:10 +0530
"Ajay Bansal" <Ajay_Bansal@infosys.com> 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).
>
>
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* include <strstream.h> --- ostrstream
@ 2003-07-03  8:24 Ajay Bansal
  2003-07-03  9:02 ` m.
  2003-07-03  9:07 ` Claudio Bley
  0 siblings, 2 replies; 6+ messages in thread
From: Ajay Bansal @ 2003-07-03  8:24 UTC (permalink / raw)
  To: gcc-help

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).



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-07-03 13:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-03  9:45 include <strstream.h> --- ostrstream Ajay Bansal
2003-07-03 13:49 ` John Love-Jensen
     [not found] <2B721C6525F0D411B1E900B0D0226BDD02D4B4A0@mohmsg01.ad.infos ys.com>
2003-07-03 11:22 ` Andrea 'fwyzard' Bocci
  -- strict thread matches above, loose matches on Subject: below --
2003-07-03  8:24 Ajay Bansal
2003-07-03  9:02 ` m.
2003-07-03  9:07 ` Claudio Bley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).