+ 1
What is the difference between endl and the manual enter button?
I know that endl creates a line break, but so does manually pressing the enter button. Does one take less space in the coding to use/compute than the other? Or does it not technically matter which one you use?
4 odpowiedzi
+ 1
" endl flushes the output stream, while \n is simply a newline character. "
https://www.sololearn.com/discuss/2971109/?ref=app
search bar will provide you more..
hope these helps.
https://www.sololearn.com/discuss/1392532/?ref=app
https://www.sololearn.com/discuss/650395/?ref=app
https://www.sololearn.com/discuss/2444470/?ref=app
https://www.sololearn.com/discuss/127013/?ref=app
+ 1
endl in an instruction to compiler for execution. pressing enter is your typing character.
It's like difference between writing and executing... is not it ?
+ 1
You are right. I got confused, sorry 😅 I meant the difference between \n and endl - these are the two linebreakers right?
+ 1
Thank you! 😊