Before you declare this question as a duplicate of this or that, please consider that I've submitted a problem to the online judge with \n
and got WA, and then with std::endl
and got AC. So, I need a very specific answer to the point of platform awareness: Is \n
really platform aware, and does the runtime really write the correct line ending according to the platform as the answers to the other questions claim? If so, could you please tell me how this happened??
If the answer can be supported by a citation from the standard regarding the platform awareness issue, I'd be really thankful. I've read all the other questions' answers (even the closed ones), so please don't repeat the "flushes the buffer" thing.