title: How to read and write a STL C++ string?
body: <pre><code>#include&lt;string&gt;
  ...
  string in;
  
  //How do I store a string from stdin to in?
  //
  //gets(in) - 16 cannot convert `std::string' to `char*' for argument `1' to 
  //char* gets (char*)' 
  //
  //scanf("%s",in) also gives some weird error
  </code></pre>
  
  <p>Similarly, how do I write out <code>in</code> to stdout or to a file??</p>