omgh4x0rz
05-01-2007, 03:18 AM
How can I get the program to cout something if the specified file is not found?
For example, say I want to use infile>>something;
and declare ifstream infile("test.txt"); as the infile. Is there a boolean function somewhere that returns false if the file is not found?
For example, say I want to use infile>>something;
and declare ifstream infile("test.txt"); as the infile. Is there a boolean function somewhere that returns false if the file is not found?