Jump to content

C++ Programming/Code/Standard C Library/Functions/setbuf

From Wikibooks, open books for an open world

setbuf

[edit | edit source]
Syntax
#include <cstdio>
void setbuf( FILE *stream, char *buffer );

The setbuf() function sets stream to use buffer, or, if buffer is NULL, turns off buffering. This function expects that the buffer be BUFSIZ characters long - since this function does not support specifying the size of the buffer, buffers larger than BUFSIZ will be partly unused.

Related topics
fclose - fopen - setvbuf