The book: Ray Tracing in One Weekend
Specific location: 2.3. Adding a Progress Indicator, Listing 3
Hello everyone! I recently started to learn about the usage of std::flush and found that our code used
std::cerr << "\rScanlines remaining: " << j << ' ' << std::flush;.
However, since std::cerr is not buffered like std::cout, wouldn't this make our std::flush redundant? If not, what is the purpose of std::flush here?