Additionally, for buffered streams, endl flushes the buffer (i.e. writes all unwritten characters in the buffer to the output sequence, see ostream::flush).
- Output stream on which the insertion is performed.
Because this function is designed as a manipulator, it can be used directly with no arguments in conjunction with the insertion operator (<<) on output streams (see example).
Return ValueThe same stream object on which the operation was performed (parameter os).
This example demonstrates different ways of using a manipulator.
Basic template declaration
|flush||Flush stream buffer (manipulator function)|
|ostream::operator<<||Insert data with format (public member function)|