basic_streambuf::sync
A protected virtual function that tries to synchronize the controlled streams with any associated external streams.
virtual int sync( );
Return Value
If the function cannot succeed, it returns -1. The default behavior is to return zero.
Remarks
sync involves writing out any elements between the beginning and next pointers for the output buffer. It does not involve putting back any elements between the next and end pointers for the input buffer.
Requirements
Header: <streambuf>
Namespace: std