A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/language/../utility/../algorithm/../io/basic_ostream/flush.html below:

std::basic_ostream<CharT,Traits>::flush - cppreference.com

Writes uncommitted changes to the underlying output sequence. Behaves as an UnformattedOutputFunction.

If rdbuf() is a null pointer, the sentry object is not constructed.

Otherwise, after constructing and checking the sentry object, calls rdbuf()->pubsync(). If the call returns -1, calls setstate(badbit).

[edit] Return value

*this

[edit] Exceptions

May throw std::ios_base::failure if (exceptions() & badbit) != 0.

[edit] Example

Output:

Output from main
Output from thread... 1 2 3 4 5 6 7 8 9
[edit] Defect reports

The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

[edit] See also invokes sync()
(public member function of std::basic_streambuf<CharT,Traits>) [edit] synchronizes the buffers with the associated character sequence
(virtual protected member function of std::basic_streambuf<CharT,Traits>) [edit] flushes the output stream
(function template) [edit] outputs '\n' and flushes the output stream
(function template) [edit] synchronizes with the underlying storage device
(public member function of std::basic_istream<CharT,Traits>) [edit]

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4