+ 2
What is the significance of the "endl;"?
Is it different than "\n"?
5 Answers
+ 1
Practically no. \n can be inserted anywhere between " " so you can make new lines inside instead of writing << endl over and over again
+ 1
Yes, they're different. "\n" is a string member of size 1. But endl is a object that adds "\n" to you output.
Summary:
In practical reasons "\n" is faster.
+ 1
1 ŃŠøŠ¼Š²Š¾Š», Ń ŠøŠ¼ŠµŠ» Š²Š²ŠøŠ“Ń:)
1 character
+ 1
Š°Š° Š²ŃŃ ŠæŠ¾Š½ŃŠ» :-)
0
ŠŠ¼ŠøŃŃŠøŠ¹ Š²ŃŠ¾Š“Šµ ŃŠ°Š·Š¼ŠµŃ "\n" 4?