- 2
"endl" makes a line
cout << " hi " << endl; Cout << " hello" ; Counsel Hi Hello Counsel With out endl Hi hello
1 Antwort
+ 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.