How to clear a stringstream and write string into it and read it?
<pre><code>stringstream ss;
ss &lt;&lt; 3;
int n;
ss &gt;&gt; n;
cout &lt;&lt; n &lt;&lt; endl; // prints 3
ss.str("");
ss &lt;&lt; 4;
ss &gt;&gt; n;
cout &lt;&lt; n &lt;&lt; endl; //prints 3
</code></pre>

<p>I just don't want to use new variable.</p>
