title: how to reset stringstream object
body: <p>I have a stringstream object and I am wondering how to reset it.</p>
  
  <pre><code>stringstream os;
  for(int i = 0; i &lt; 10; ++i){
          value = rand() % 100;
          os&lt;&lt;value;
          cout&lt;&lt;os.str()&lt;&lt;" "&lt;&lt;os&lt;&lt;endl;
          ntree-&gt;insert(os.str());
          //I want my os object to be reset here
      }
  </code></pre>