Objects of class ifstream
are opened for input by default, so the statement
ifstream inClientFile( "clients.txt" );
opens 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.
18.226.177.86