- 2

"endl" makes a line

cout << " hi " << endl; Cout << " hello" ; Counsel Hi Hello Counsel With out endl Hi hello

4th Sep 2016, 8:16 PM
wess
1 Réponse
+ 1
Yes it does. You can achieve the same result with: cout<<"Hi\nHello\n"; The \n when enclosed in ' ' or as part of a " " string tells the compiler to move down to the next line. Much like endl does.
4th Sep 2016, 9:24 PM
Donovan
Donovan - avatar