DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
C++ Stream Library

stdiobuf(C++)


stdiobuf -- iostream specialized to stdio FILE

Syntax

#include <iostream.h>
#include <stdiostream.h>
#include <stdio.h>

class stdiobuf : public streambuf { stdiobuf(FILE* f); FILE* stdiofile(); };

Description

Operations on a stdiobuf are reflected in the associated FILE. A stdiobuf is constructed in unbuffered mode, which causes all operations to be reflected immediately in the FILE. seekg()s and seekp()s are translated into fseek()s. setbuf() has its usual meaning; if it supplies a reserve area, buffering will be turned back on.

Caveats

stdiobuf is intended to be used when mixing C and C++ code. New C++ code should prefer to use filebufs, which have better performance.

See also

filebuf(C++), istream(C++), ostream(C++), sbuf.pub(C++)
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003