flushall
raw OCR
Flushes all streams.
Defined in header <stdio.h>
Syntax
#include <stdio.h>
int flushall(void);
Portability
| DOS | UNIX | Windows | ANSI C | C++ only |
|---|---|---|---|---|
| ■ | ■ | ■ |
Remarks
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.
See also
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 i
/* close the file */
fclose(stream);
return 0;
See memccpy.
See memchr.
See memcmp.
See memcpy.
See memicmp.
See memset.
Differences from modern implementations
Nothing recorded yet.
Modern references
These are search links, not yet checked by hand.
Stable link: /3.1/stdio.h/flushall/
· short form /3.1/flushall/