I've copied the example from the book exactly; still not working. here's the code:
1 2 3 4 5 6 7 8 9 10
ifstream inFile;
inFile.open("reservationLog.txt");
if(inFile.fail()){
cout<<"File unsuccessfully opened."<<endl
<<"Please check to see if file exists."<<endl;
exit(1);
}
cout<<"\n the file has been successfully opened for reading."<<endl;