LabWindows/CVI

Content Type
Programming Language
Current manual
Table of Contents

fflush

fflush

int fflush (FILE *stream);

Purpose

Flushes the I/O buffer of the specified stream. If the specified stream is open for output (write or append) or if it is open for update (read/write or read/append) and the most recent I/O operation was not an input operation, then this function writes any unwritten data to that stream. If the specified stream is open for input (read), this function clears the buffer contents of the stream.

Parameters

Input
Name Type Description
stream FILE * Specifies the I/O stream that will have its buffer contents flushed. A flush occurs only if this stream is open for output or update (read/write or read/append), and the most recent operation is not an input operation. If the specified stream is open for input (read), this function clears the buffer contents of the stream.
Note Note  Entering NULL in this parameter flushes all output buffers.

Return Value

Name Type Description
status int Contains the returned status of the function. On success, fflush returns 0. If an error occurs, fflush returns EOF and sets errno to a nonzero value.

Additional Information

Library: ANSI C Library

Include file: ansi_c.h

LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later

Was this information helpful?