home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / CH11 / A11202.TXT < prev    next >
Encoding:
Text File  |  1993-08-04  |  476 b   |  9 lines

  1. The simplest way to open a file is to create an object of the
  2. ifstream, ofstream, or fstream classes and establish the file as
  3. its ultimate producer or consumer.  These code samples show two
  4. equivalent methods for doing this.  In the code on the left, the
  5. stream objects are created by constructors, then the files are
  6. opened and associated with the objects by calls to open().  In the
  7. code on the right, the constructors create the stream objects and
  8. open the files.
  9.