Share via


basic_filebuf::sync

Tries to synchronize the controlled streams with any associated external streams.

virtual int sync( );

Return Value

Returns zero if the file pointer fp is a null pointer. Otherwise, it returns zero only if calls to both overflow and fflush(fp) succeed in flushing any pending output to the stream.

Requirements

Header: <fstream>

Namespace: std

See Also

Reference

basic_filebuf Class

iostream Programming

iostreams Conventions