- ... section.1
- cin is just a special instance of a general input class called
ifstream. The functions we describe here will work both for
cin and for input file stream objects, which are covered later.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...fstream.2
- Well, okay, there are actually three. In addition to these two, there
is also a more generalized one called fstream, which can be
configured for both reading and writing. We will not cover the use
of fstream.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ....open(filename); 3
- The class ifstream
also has a constructor which takes a filename and flags as arguments so that
you can open the file as you create it if you prefer. e.g. ifstream file(filename);
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.