Connecting Tech Pros Worldwide Help | Site Map

How to clean ostringstream?

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 22nd, 2005, 09:55 PM
Peng Yu
Guest
 
Posts: n/a
Default How to clean ostringstream?

ostringstream os;
os << "S.par";


Suppose I have the above code. Later on, I want to clean os to be an
empty. Could you tell me what member function I should use?

Thanks,
Peng

  #2  
Old July 22nd, 2005, 09:55 PM
Victor Bazarov
Guest
 
Posts: n/a
Default Re: How to clean ostringstream?

"Peng Yu" <pengyu.ut@gmail.com> wrote...[color=blue]
> ostringstream os;
> os << "S.par";
>
>
> Suppose I have the above code. Later on, I want to clean os to be an
> empty. Could you tell me what member function I should use?[/color]

os.str("");
os.clear();

And please use groups.google.com to search for answers that have
already been given more than once before asking them. Thanks.

V


  #3  
Old July 22nd, 2005, 09:56 PM
Peteris Krumins
Guest
 
Posts: n/a
Default Re: How to clean ostringstream?

Peng Yu <pengyu.ut@gmail.com> wrote in message news:<j5uip05tr27u4oii7eu58tpmk4u678474u@4ax.com>. ..[color=blue]
> ostringstream os;
> os << "S.par";
>
>
> Suppose I have the above code. Later on, I want to clean os to be an
> empty. Could you tell me what member function I should use?
>[/color]

os.str("");


P.Krumins
  #4  
Old July 22nd, 2005, 09:56 PM
Stephan Br?nnimann
Guest
 
Posts: n/a
Default Re: How to clean ostringstream?

Peng Yu <pengyu.ut@gmail.com> wrote in message news:<j5uip05tr27u4oii7eu58tpmk4u678474u@4ax.com>. ..[color=blue]
> ostringstream os;
> os << "S.par";
>
>
> Suppose I have the above code. Later on, I want to clean os to be an
> empty. Could you tell me what member function I should use?
>
> Thanks,
> Peng[/color]

We are
using os.str("");
but I don't know if it's exactly according to the standard.

Stephan Brönnimann
broeni@osb-systems.com
Open source rating and billing engine for communication networks.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.