Re: making stringstream empty
In message
<ccaa3c01-7313-4ed0-8b4b-34afc582ba26@t66g2000hsf.googlegroups.com>,
=?GB2312?B?yrGzvc6w?= <shichenweixjtu@gmail.com> writes
>On 2ÔÂ21ÈÕ, ÏÂÎç5ʱ20·Ö, mthread <rjk...@gmail.com> wrote:
>> Hi,
>> I am using a variable of type stringstream in my application. I
>> am adding some information in the stream. I would like to know what is
>> the method to make the stream empty. Thanx in advance.
>
>you can use clear() method to make the stream empty.
No, you can't. clear() clears the iostate flags. str("") makes it empty.
--
Richard Herring
|