cout << "Failed to open file" << endl;
___________(_________) // type either true or false in the parenthesis which ever one would make the program crash
}
return 0;
}
1
Expert's answer
2017-10-16T14:42:07-0400
#include <iostream> #include <fstream>
using namespace std;
int main() { ifstream inf;
inf.open("input.txt");
if(!inf){ cout << "Failed to open file" << endl; exit(1); }
Comments
Leave a comment