+ 8
'\n' is faster. "endl" flushes the buffer.
8th Jul 2018, 5:32 AM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
+ 3
both are used to change lines.. \n is faster as Ben already pointed out.. other diff is their syntax
11th Jul 2018, 5:32 PM
Mohan Hamal
Mohan Hamal - avatar
+ 2
Tharuke They're actually different. See my comment above.
8th Jul 2018, 6:21 PM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
+ 1
new line
14th Jul 2018, 11:08 PM
abdulrahman umar
abdulrahman umar - avatar
+ 1
jonathan ishak No don't do that they both have different use cases
9th Aug 2018, 11:16 AM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
0
both are used in same context where u need new line... bt \n is much faster
8th Jul 2018, 2:49 PM
Dhanaraj S
Dhanaraj S - avatar
0
Under what circumstances do I need to consider using endl to flush the buffer?
13th Sep 2018, 11:21 AM
Nathan
- 1
just to go in new line
8th Jul 2018, 6:20 PM
surya dev
surya dev - avatar
- 1
just know both and try using the one which u are comfortable with.
9th Aug 2018, 7:08 AM
ubercrack247
ubercrack247 - avatar