title: use of ss.str("") after ss.clear() for a newly defined string stream
body: <p>(Learning C++) I have been looking at code portion below:</p>
  
  <pre><code>stringstream ss;
  
  // more code 
  
  ss.clear();
  ss.str("");
  </code></pre>
  
  <p>Why is <code>ss.str("");</code> called when <code>ss.clear();</code> is meant to remove the string value? I printed out the <code>str()</code> value to <code>std::cout</code> and saw that it had length zero without the line <code>ss.str("");</code> so why is it included?</p>
  
  <p>In my research, I ran into this <a href="https://stackoverflow.com/questions/624260/how-to-reuse-an-ostringstream/624291#624291">question</a> and the accepted answer by @Johannes Schaub - litb does the same thing. What am I missing out. </p>