Namespaces
Variants
Views
Actions

fflush

From cppreference.com
< c‎ | io
Revision as of 05:49, 16 October 2013 by Eendy (Talk | contribs)

 
 
File input/output


Functions
File access
Direct input/output
Unformatted input/output
(C95)(C95)
(C95)
(C95)(C95)
(C95)
(C95)
Formatted input
Formatted output
File positioning
Error handling
Operations on files
 
Defined in header <stdio.h>
int fflush( FILE *stream );

Causes the output file stream to be synchronized with the actual contents of the file.

The behavior is undefined if the given stream is of the input type or if the given stream is of the update type, but the last I/O operation was not an output operation.

If stream is NULL, all open streams are flushed.

Parameters

stream - the file stream to synchronize

Return value

Returns zero on success. Otherwise EOF is returned and the error indicator of the file stream is set.

See also

opens a file
(function) [edit]
closes a file
(function) [edit]