Thinking about UNIX, Windows and Mac and an output stream (both binary and text),
What does std::endl represent, i.e. ,
std::endl
The C++ standard says that it:
Calls os.put(os.widen(’\n’) ), then os.flush()
What the '\n' is converted to, if it is converted at all, is down to the stream type it is used on, plus any possible mode the stream may be opened in.