ios::nocreate was removed in the latest standard, for some reason. Without it, how do I open a file (for reading) ONLY if it exists? I read in some other post here that the file shouldn't be opened if it doesn't exists, but mine still does.
Code:ifstream ReadFile; ReadFile.open(FileName, ios::in); //I want ot add ios::nocreate here too... if(ReadFile.fail()) { //Never reached, even though the file doesn't exists return 0; }