From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/c/io%2Ffflush.html | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 devdocs/c/io%2Ffflush.html (limited to 'devdocs/c/io%2Ffflush.html') diff --git a/devdocs/c/io%2Ffflush.html b/devdocs/c/io%2Ffflush.html new file mode 100644 index 00000000..b3ba8716 --- /dev/null +++ b/devdocs/c/io%2Ffflush.html @@ -0,0 +1,26 @@ +

fflush

Defined in header <stdio.h>
int fflush( FILE *stream );
+

For output streams (and for update streams on which the last operation was output), writes any unwritten data from the stream's buffer to the associated output device.

+

For input streams (and for update streams on which the last operation was input), the behavior is undefined.

+

If stream is a null pointer, all open output streams are flushed, including the ones manipulated within library packages or otherwise not directly accessible to the program.

+

Parameters

+ +
stream - the file stream to write out

Return value

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

+

Notes

POSIX extends the specification of fflush by defining its effects on an input stream, as long as that stream represents a file or another seekable device: in that case the POSIX file pointer is repositioned to match the C stream pointer (which effectively undoes any read buffering) and the effects of any ungetc or ungetwc that weren't yet read back from the stream are discarded.

+

Microsoft also extends the specification of fflush by defining its effects on an input stream: in Visual Studio 2013 and prior, it discarded the input buffer, in Visual Studio 2015 and newer, it has no effect, buffers are retained.

+

References

See also

+ + +
+
(C11)
opens a file
(function)
closes a file
(function)
C++ documentation for fflush
+

+ © cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
+ https://en.cppreference.com/w/c/io/fflush +

+
-- cgit v1.2.3