title: C++ file output only accepts the first word
body: <p>I'm trying to output a string to a basic .txt file. And it only partially works, and by that I mean that it only accepts the first word of whatever I type. I need to be able to have no character limit as well (the user can type in however much they want)</p>
  
  <pre><code>#include &lt;fstream&gt;
  #include &lt;iostream&gt;
  #include &lt;cstdlib&gt;
  
  using namespace std;
  
  int main()
  {
  
      ifstream in_stream;
      ofstream out_stream;
  
      in_stream.open("advice.txt");
      if (in_stream.fail())
      {
       cout &lt;&lt; "input file opening failed.\n";
       exit(1);                     
      }
  
  
      char next;
  
      in_stream.get(next);
      while (! in_stream.eof())
      {
       cout &lt;&lt; next;
       in_stream.get(next);      
      }
  
  
      out_stream.open("advice.txt", ios::app); //Append data to file
      if (out_stream.fail())
      {
       cout &lt;&lt; "output file opening failed.\n";
       exit(1);                     
      }
  
  
      //Output text into the file (Problem is in here)
  
      string mystring;
  
      cin &gt;&gt; mystring, "\n\n";
      out_stream &lt;&lt; " - " &lt;&lt; mystring &lt;&lt; "\n\n";
  
      in_stream.close();
      out_stream.close();
  
      cin.get();
      cin.get();
      return 0;
  
  }
  </code></pre>
  
  <p>Any future help will be greatly appreciated :) Thanks in advance!</p>