title: C++ New line character when outputting to a text file
body: <p>This is just a quick question. But I am trying to output data to a file, which works fine.
  However I am also trying to implement a new line at the appropriate point so the data, prints on individual lines.</p>
  
  <p>This is how my code currently looks:</p>
  
  <p>main.cpp</p>
  
  <pre><code>Writer w("Output.txt");
      w.writeString("The number of words in the script are: ");
      w.writeInt(count);
      w.writeEol();
      w.writeString("The number of Officers in the script are: ");
      w.writeInt(ofCount);
      w.writeEol();
      w.writeString("The number of Courtiers in the script are: ");
      w.writeInt(cCount);
          w.close();
  </code></pre>
  
  <p>Writer.cpp</p>
  
  <pre><code>void Writer::writeEol()
  {
      out &lt;&lt; "\n" &lt;&lt; endl;
  }
  </code></pre>
  
  <p>My code has to be implemented this way as my whole system is built around it like this.</p>
  
  <p>So my question is, how would I adjust my Writer::writeEol() to add a new line to my output file?</p>
  
  <p>My output file currently comes out like this:</p>
  
  <pre><code>    The number of words in the script are: 32339The number of Officers in the script are: 2The number of Courtiers in the script are: 9
  </code></pre>
  
  <p>Any help is greatly appreciated. :)</p>