Standard C++ Library Reference ISO/IEC (VERSION3)
SEEK_END
#define SEEK_END <integer constant expression>
The macro yields the value of the mode argument to fseek to indicate seeking relative to the
end of the file.
SEEK_SET
#define SEEK_SET <integer constant expression>
The macro yields the value of the mode argument to fseek to indicate seeking relative to the
beginning of the file.
setbuf
void setbuf(FILE *stream, char *buf);
If buf is not a null pointer, the function calls setvbuf(stream, buf, __IOFBF,
BUFSIZ), specifying full buffering with _IOFBF and a buffer size of BUFSIZ characters.
Otherwise, the function calls setvbuf(stream, 0, _IONBF, BUFSIZ), specifying no
buffering with _IONBF.
setvbuf
int setvbuf(FILE *stream, char *buf, int mode,
size_t size);
The function sets the buffering mode for the stream stream according to buf, mode, and
size. It returns zero if successful. If buf is not a null pointer, then buf is the address of the
first element of an array of char of size size that can be used as the stream buffer. Otherwise,
setvbuf can allocate a stream buffer that is freed when the file is closed. For mode you must
supply one of the following values:
_IOFBF -- to indicate full buffering●
_IOLBF -- to indicate line buffering●
_IONBF -- to indicate no buffering●
You must call setvbuf after you call fopen to associate a file with that stream and before
you call a library function that performs any other operation on the stream.