The Microsoft Input/Output Stream Classes (iostream.hlp) (Table of Contents; Topic list)
class fstream
iostream                                    Up Contents Index Back
──The Microsoft iostream Classes────────────────────────────────────────────
 
  Description
 
  The fstream class is an iostream derivative specialized for combined
  disk file input and output. Its constructors automatically create and
  attach a filebuf buffer object.
 
  The filebuf class documentation describes the get and put areas and
  their associated pointers. Although the filebuf object's get and put
  pointers are theoretically independent, the get area and the put area
  cannot both be active at the same time. Therefore, when the stream's
  mode changes from input to output, the get area is emptied and the put
  area is reinitialized. When the mode changes from output to input, the
  put area is flushed and the get area is reinitialized.
 
  #include <fstream.h>
 
  See Also
 
  ifstream, ofstream, strstream, stdiostream, filebuf
 
  Public Members
 
  Construction/Destruction
 
  fstream   Constructs an fstream object.
 
  ~fstream   Destroys an fstream object.
 
  Operations
 
  open      Opens a file and attaches it to the filebuf object and thus
              to the stream.
 
  close     Flushes any waiting output and closes the stream's file.
 
  setbuf    Attaches the specified reserve area to the stream's filebuf
              object.
 
  setmode   Sets the stream's mode to binary or text.
 
  attach    Attaches the stream (through the filebuf object) to an open
              file.
 
  Status/Information
 
  rdbuf     Gets the stream's filebuf object.
 
  fd        Returns the file descriptor associated with the stream.
 
  is_open   Tests whether the stream's file is open.
 
 
                                     -♦-