title: How do I use write with stringstream?
body: <p>I have a <code>vector&lt;char&gt;</code> of data which I want to write into <code>std::stringstream</code>. </p>
  
  <p>I tried:</p>
  
  <pre><code>my_ss.write(vector.data(), vector.size());
  </code></pre>
  
  <p>...but it seems to put nothing into <code>my_ss</code> which I declared as follows:</p>
  
  <p><code>std::stringstream my_ss(  std::stringstream::binary);</code> </p>
  
  <p>Why write is not working (app does not crash and compiles with 0 errors, 0 warnings)?</p>