title: Writing text to a file, including spaces
body: <p>I have the following program in C++:</p>
  
  <p>There are two problems with this program.  First of all, if the user makes use of spaces in the text, then the data after the first space is NOT saved.  How can I solve this problem?</p>
  
  <p>Secondly, I want to include a line break between the text appended in one session and another in the text file.  How can I instruct the program to do so?  Thanks :)</p>