0

what is the difference between endl and \n

16th Jul 2016, 8:33 AM
Hasnat
6 odpowiedzi
+ 4
Yes, they're different. "\n" is just a string of length 1 that gets appended to stdout. std::endl, instead, is an object that will cause to append the newline character ("\n") AND to flush stdout buffer. For this reason it will take more processing.
16th Jul 2016, 8:35 AM
Karan Luther
Karan Luther - avatar
+ 1
ohh
16th Jul 2016, 8:37 AM
Hasnat
0
they are same
16th Jul 2016, 3:44 PM
jainam
0
mmm
19th Jul 2016, 7:51 PM
Last Day
Last Day - avatar
0
\n is an a new line endl is an a end line
25th Aug 2016, 5:21 AM
Manish s Puthran
Manish s Puthran - avatar
0
\n is an a new line endl is an a end line
25th Aug 2016, 5:21 AM
Manish s Puthran
Manish s Puthran - avatar