-
Notifications
You must be signed in to change notification settings - Fork 910
Use of std::flush in std::cerr #935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thank you! I didn't realize that
and
I'd never heard of |
Thanks for the quick reply. I agree with you on using |
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 likestd::cout
, wouldn't this make ourstd::flush
redundant? If not, what is the purpose ofstd::flush
here?The text was updated successfully, but these errors were encountered: