home *** CD-ROM | disk | FTP | other *** search
- The simplest way to open a file is to create an object of the
- ifstream, ofstream, or fstream classes and establish the file as
- its ultimate producer or consumer. These code samples show two
- equivalent methods for doing this. In the code on the left, the
- stream objects are created by constructors, then the files are
- opened and associated with the objects by calls to open(). In the
- code on the right, the constructors create the stream objects and
- open the files.
-