you are viewing a single comment's thread
view the rest of the comments
[–] 40 points 1 year ago (1 child)

std::endl is used in output streams in C++ to end the line, using the os specific line termination sequence, and flush the buffer.

The later one is a performance issue in many cases, why the use of "\n" is considered preferred

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 1 year ago (2 children)

    Don’t most terminals flush the buffer on newline anyway?

  • source
  • parent
  • hideshow 4 child comments