From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8829 invoked by alias); 28 Sep 2005 22:38:59 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 8817 invoked by uid 22791); 28 Sep 2005 22:38:54 -0000 Received: from emroute1.cind.ornl.gov (HELO emroute1.cind.ornl.gov) (160.91.4.119) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 28 Sep 2005 22:38:54 +0000 Received: from emroute1.cind.ornl.gov (localhost [127.0.0.1]) by emroute1.cind.ornl.gov (PMDF V6.2-1x9 #31038) with ESMTP id <0INJ005YDTKRRX@emroute1.cind.ornl.gov> for gcc-help@gcc.gnu.org; Wed, 28 Sep 2005 18:38:51 -0400 (EDT) Received: from [192.168.1.99] (pcp04535297pcs.oakrdg01.tn.comcast.net [68.34.214.151]) by emroute1.cind.ornl.gov (PMDF V6.2-1x9 #31038) with ESMTPSA id <0INJ00F38TKKSR@emroute1.cind.ornl.gov>; Wed, 28 Sep 2005 18:38:51 -0400 (EDT) Date: Wed, 28 Sep 2005 22:38:00 -0000 From: "Ernest L. Williams Jr." Subject: Re: ostrstream problem In-reply-to: To: John Love-Jensen Cc: MSX to GCC Reply-to: ernesto@ornl.gov Message-id: <1127947123.6306.0.camel@localhost.localdomain> MIME-version: 1.0 Content-type: text/plain Content-transfer-encoding: 7bit References: X-SW-Source: 2005-09/txt/msg00203.txt.bz2 On Wed, 2005-09-28 at 07:20 -0500, John Love-Jensen wrote: > 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. Awesome. I will definitely be using std::ostringstream in the future. Thanks, Ernest > > Sincerely, > --Eljay >