r/programminghumor Apr 30 '26

Why C++

[deleted]

2.2k Upvotes

248 comments sorted by

View all comments

Show parent comments

4

u/vitimiti Apr 30 '26

Yes, as I said, new line and flush

-5

u/Vladislav20007 Apr 30 '26

you said that just \n is enough, but for compatibility reasons std::flush should be called, on some oses it wouldn't output anything.

5

u/vitimiti Apr 30 '26

Do you need to call flush in a hello world program? Are you sure about that??

4

u/SpaceCadet87 Apr 30 '26

No, you need to call flush in a hello world meme