stdiobuf(3C++)


stdiobuf -- iostream specialized to stdio FILE

Synopsis

   #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.

Usage

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

References

filebuf(3C++), istream(3C++), ostream(3C++), streambuf_pub(3C++)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004