+ 1
What is difference between \n and endl
2 ответов
+ 4
endl is a manipulator that inserts a new-line character. Additionally, for buffered streams, endl flushes the buffer (i.e. writes all unwritten characters in the buffer to the output sequence, see ostream::flush).
And '\n' is actually a new-line character.
0
no difference both use for end linr!