0

What is the difference between "endl" and "/n" ?

9th Oct 2017, 6:06 AM
Abdullah Azam
Abdullah Azam - avatar
2 ответов
+ 14
"\n" is a scape sequence (a string of length 1) which inherited from C and cause a new line operation. "endl" is an object which does the same thing as "\n" and also flushes standard output buffer. You probably ask what do you mean by flushing the standard output. The following link leads you through some examples. [https://www.quora.com/What-does-it-mean-to-flush-the-output-stream-in-C++]
9th Oct 2017, 6:28 AM
Babak
Babak - avatar
9th Oct 2017, 6:24 AM
Manual
Manual - avatar