_flushall
Remonter à Stdio.h - Index
Header File
stdio.h
Category
Input/output Routines
Prototype
int _flushall(void);
Description
Flushes all streams.
_flushall clears all buffers associated with open input streams and writes all buffers associated with open output streams to their respective files. Any read operation following _flushall reads new data into the buffers from the input files. Streams stay open after _flushall executes.
Return Value
_flushall returns an integer the number of open input and output streams.
Example
#include <stdio.h>
int main(void)
{
FILE *stream;
/* create a file */
stream = fopen("DUMMY.FIL", "w");
/* flush all open streams */
printf("%d streams were flushed.\n", flushall());
/* close the file */
fclose(stream);
return 0;
}
Portability
POSIX | Win32 | ANSI C | ANSI C++ |
---|---|---|---|
+ |