If I run the above line of code and test.txt does not exists, is there some sort of return code that I can check to verify that it does not exist?Code:ofstream a_file("test.txt", ios::nocreate);
Ex.Code:ofstream a_file("test.txt", ios::nocreate); if (SOME_CONDITION) { //file does not exist, do something } //file does exist, do something else