cout << "Welcome to Adam's survey program" << endl;
cout << endl;
cout << "Please enter the name of your data file: ";
cin >> fileName;
inFile.open(fileName.c_str()); //open the input file
if (!inFile)
{
cout << "Cannot open the input file. "
<< "The program terminates. " << endl;
return 1;
}
/*My program will not recognize my fileName variable name and output error value of 1.The program needs to know the exact location of the txt. file correct? Including the entire pathname?
PLEASE HELP!*/