title: how to clear the content in the String stream.?
body: <p>can any one tell me how to clear the content of the stringstream..?
  i tried the following but it didnt work.</p>
  
  <pre><code>stringstream ss;
  ss&lt;&lt;"bala"&lt;&lt;"murugan";
  cout&lt;&lt;ss.str();         //Output balamurugan
  ss.str().clear();
  ss&lt;&lt;" hi";
  cout&lt;&lt;ss.str();
  // output is balamurugan hi 
  </code></pre>
  
  <p>my required output is " hi" alone..
  Pls tell me</p>