GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::fflush(3) C++ Standard Libary std::fflush(3)

std::fflush - std::fflush


Defined in header <cstdio>
int fflush( std::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.


stream - the file stream to write out


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


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 std::ungetc or
std::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.


fopen opens a file
(function)
fclose closes a file
(function)

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.