When I compile this program I do not receive an error message, but when I run it, the age and factor will not output. I have never wrote a program where the input file is a constant file. I always ask for the user to input the file name and then go from there.. So I believe my problem has to do with the file not being opened.
my professor said that the input file as to be named "adjustFactors"
These are his exact words from the rubric, "The adjustment factors are in the file called adjustFactors. Do use this exact filename"
I have always had the program prompt for the user to input the file name and then open it up.. I've never had to open a file without prompting the user.
Yes, that was understood from the previous posts. So you need to open the file named "adjustFactors", rather than the file named "" as in your current code. (In any case the empty string isn't a valid file name).
1 2 3 4 5
string apple;
cout << "apple: " << apple << '\n';
string fruit = "apple";
cout << "fruit: " << fruit << '\n';
note the output:
apple:
fruit: apple
apple is an empty string, while fruit contains the string "apple".