0
Why endl,endl,endl use 3times in a code??
3 Answers
+ 3
You can use endl as often as you like. Go to Code section, click +, select C++, create an example code. You will see that each endl is one linebreak.
Please ONLY LINK THREADS THAT ARE RELATED TO YOUR QUESTION.
+ 3
You have linked a SQL question. Please correct the link.
In C++ endl outputs a newline and then flushes the output buffer to the stream. Flushing the buffer causes it to print immediately instead of waiting until the output buffer fills up.
It is a little wasteful to perform endl three times. The intent would be to make extra blank lines in the output, but there is no need to flush every newline. It would be more efficient to send two newlines ("\n\n") and one endl.
+ 1
Where ?
Anywhere... For 3 line breaks.. if you need..
endl means end line