Daily Dose C++: std::endl

Source:

C++ Weekly: Stop using std::endl
CPP Reference endl
CPP Reference flush

The Dose:

<< std::endl; is the same as << "\n" << std::flush;.

Do you need to flush every time you end a string?

I definitely don't have to.

Better to just call flush when you need it.


You'll only receive email when Wron publishes a new post

More fromĀ Wron