+ 3
Is there a difference between endl and /n ?
.
3 Respuestas
+ 4
'endl' flushes the buffer also, while '\n' does not.
+ 2
@Jakob Marley and flushing the buffer is simply to help performance, correct?
+ 2
@Ethan
Yes, that's correct. It helps prevent excessive writes by storing it in the buffer until it's flushed.