Type value; while(inFile >> value) { //loop body goes here. } if(inFile.eof()) { //terminated with EOF } else if(inFile.fail()) { //terminated with mismatch } else { //terminated with some reason unknown }
2023-10-27 17:40:34
Type value; while(inFile >> value) { //loop body goes here. } if(inFile.eof()) { //terminated with EOF } else if(inFile.fail()) { //terminated with mismatch } else { //terminated with some reason unknown }