title: what does std::endl represent exactly on each platform?
body: <p>Thinking about UNIX, Windows and Mac and an output stream (both binary and text),</p>
  
  <p>What does <code>std::endl</code> represent, i.e. <code>&lt;CR&gt;&lt;LF&gt;</code>, <code>&lt;LF&gt;</code> or <code>&lt;CR&gt;</code>? Or is it always the same no matter what platform/compiler?</p>
  
  <p>The reason I'm asking is that I'm writing a TCP client that talks a protocol that expects each command to end in <code>&lt;CR&gt;&lt;LF&gt;</code>.  So I'm wondering whether to use <code>std::endl</code> or <code>"\r\n"</code> in my streams.</p>
  
  <p><em>EDIT:</em> Ok, so one flushes the buffer and another doesn't.  I get that.  But if I'm outputting text to a file, is <code>'\n'</code> equal to <code>&lt;LF&gt;</code> or does it convert to <code>&lt;CR&gt;&lt;LF&gt;</code> on Windows and <code>&lt;LF&gt;</code> on Unix or not?  I don't see a clear answer yet.</p>