title: How to insert a string to the beginning of a stringstream
body: <p>For example only and not the actual code:</p>
  
  <pre><code>stringstream ss;
  ss &lt;&lt; " world!";
  
  string hello("Hello");
  
  // insert hello to beginning of ss ??
  </code></pre>
  
  <p>Thanks for all the responses, I also found this code, which works:</p>
  
  <pre><code>ostringstream&amp; insert( ostringstream&amp; oss, const string&amp; s )
  {
    streamsize pos = oss.tellp();
    oss.str( s + oss.str() );
    oss.seekp( pos + s.length() );
    return oss;
  }
  </code></pre>