omgh4x0rz
2007-04-30 23:18:39
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?