Opening a File for Input
Objects of class
ifstream are opened for input by default, so the statement
ifstream inClientFile( "clients.txt" );
clients.txt for input. Just as with an
ofstream object, an
ifstream object can be created without opening a specific file, because a file can be attached to it later.