My code reads something like
the return type of OpentheFile is a bool. If I return a '1' (TRUE) then the file is opened & stuff is done. However, if I return a '0' (FALSE) - meaning the file was nonexistant, how can I reprompt the user to enter another filename until an existant filename is entered?Code:ifstream fin; cout << "enter filename:"; cin >> filename; a = OpentheFile(filename, fin);
My loops are messed up..
any help greatly appreciated.