Namespaces
Variants
Views
Actions

std::setvbuf

From cppreference.com
< cpp‎ | io‎ | c
Revision as of 13:51, 4 May 2012 by P12bot (Talk | contribs)

Template:cpp/io/c/sidebar

Defined in header <cstdio>
int setvbuf( FILE *stream, char *buffer, int mode, size_t size );

Sets the internal buffer of the given file stream stream.

Contents

Parameters

stream - the file stream to set the buffer to
buffer - pointer to a buffer for the stream to use
mode - buffering mode to use. It can be one of the following values:
_IOFBF full buffering
_IOLBF line buffering
_IONBF no buffering
size - size of the buffer

Return value

0 on success or nonzero on failure.

Notes

This function may only be used after stream has been associated with an open file, but before any other operation.

buffer may be null, in which case this call only resizes the internal buffer.

See also

Template:cpp/io/c/dcl list setbufTemplate:cpp/io/basic filebuf/dcl list setbuf