title: Portable end of line (newline)
body: <p>It's been an unpleasant surprise that <code>'\n'</code> <a href="https://stackoverflow.com/q/2750636/341970">is replaced</a> with <code>"\r\n"</code> on Windows, I did not know that. (I am guessing it is also replaced on Mac...)</p>
  
  <p><strong>Is there an easy way to ensure that Linux, Mac and Windows users can easily exchange text files?</strong></p>
  
  <p>By easy way I mean: without writing the file in binary mode or testing and replacing the end-of-line chars myself (or with some third party program/code). This issue effects my C++ program doing the text file I/O.</p>