My college professor assigned us a program to complete. I am having trouble with a few of the methods. The first instruction asked that I "1. Use a function named PromptUser() to ask the user for a filelename. It will return the filelename as a string object.
2. Open the filename for reading. If you cannot open the fileename given, prompt the user for another. Repeat this until you can open the user's file.
The skeleton for the function he gave us looked like this
Mostly right. The instructions seem to want the promptuser() to just get the filename, so it should just do that. back in your main program you should have the
1 2 3 4 5 6 7
while(!working){
promptUser();
inFile...
if(!inf...)
else
working =true;
}