2 ms·
> Notice the “unreadable code” from C#, even the portability issue (hint: \n does not always do what you think it does). No, it does exactly what you think it
by gpderetta 11y ago
> Notice the “unreadable code” from C#, even the portability issue (hint: \n does not always do what you think it does).
No, it does exactly what you think it does (unless it is a binary stream), it adds an end-of-line to the stream. If the underlying platform needs a "\r\n", the stream will do the conversion.
- dorinlazar 11y agoYes and no. std::endl is not an alias for '\n', for good reason.