Does this exist anywhere outside of C++?

2 years ago by Hellfire103 to c/programmerhumor

load all comments
unlawfulbooger 17 points 2 years ago

What the heck is endl???

path: 0 16260560, hotness: undefined, score: 17, children: 13
vapeloki 40 points 2 years ago

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

path: 0 16260560 16260597, hotness: undefined, score: 40, children: 3
xigoi 2 points 2 years ago

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

path: 0 16260560 16260597 16261053, hotness: undefined, score: 2, children: 2
ClemaX 8 points 2 years ago

It is the stream itself that is buffered, so the terminal does not handle the contents until the stream is flushed.

path: 0 16260560 16260597 16261053 16262162, hotness: undefined, score: 8, children: 0
programmerhumor
programmerhumor

@lemmy.ml

login for more options
43730
1626
1156

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

go to feed...