Reference
C Library
IOstream Library
Strings library
STL Containers
STL Algorithms
Miscellaneous
IOstream Library
manipulators
classes:
filebuf
fstream
ifstream
ios
iostream
ios_base
istream
istringstream
ofstream
ostream
ostringstream
streambuf
stringbuf
stringstream
objects:
cerr
cin
clog
cout
types:
fpos
streamoff
streampos
streamsize
ifstream
ifstream::ifstream
member functions:
ifstream::close
ifstream::is_open
ifstream::open
ifstream::rdbuf


ifstream

class
<fstream>

Input file stream class

ifstream

ifstream provides an interface to read data from files as input streams.

The objects of this class maintain internally a pointer to a filebuf object that can be obtained by calling member rdbuf.

The file to be associated with the stream can be specified either as a parameter in the constructor or by calling member open.

After all necessary operations on a file have been performed, it can be closed (or disassociated) by calling member close. Once closed, the same file stream object may be used to open another file.

The member function is_open can be used to determine whether the stream object is currently associated with a file.

Public members


Members inherited from istream


Member functions inherited from ios


Member functions inherited from ios_base