title: how copy from one stringstream object to another in C++?
body: <p>I have <code>std::stringstream</code> object <code>ss1</code>. Now, I would like to create another copy from this one.</p>
  
  <p>I try this:</p>
  
  <pre><code>std::stringstream ss2 = ss1;
  </code></pre>
  
  <p>or:</p>
  
  <pre><code>std::stringstream ss2(ss1)
  </code></pre>
  
  <p>neither works</p>
  
  <p>The error message is like this:</p>
  
  <blockquote>
    <p>std::ios::basic_ios(const std::ios &amp;) is not accessible from
    bsl::basic_stringstream,
    bsl::allocator>::basic_stringstream(const
    bsl::basic_stringstream,
    bsl::allocator>&amp;).</p>
  </blockquote>