string1 is the only important variable because I can't get it too read from the .txt file I have. Once I get string1 to read a line and store it too string1 then I will do the same with string2 and string3
setlevel1(), setlevel2(), and setlevel3() all return strings that are stored in str1, str2, and str3. These are the lines that i'm trying to store in string1,2,3.
Sounds like your file is not being opened correctly.
You should always check to make sure your file is opened
1 2 3 4 5 6
fin.open("instorage.txt");
if (!fin)
{
std::cout << "Error: Unable to open file" << std::endl;
}
Most likely, you aren't putting your file in the right directory. Try putting the file either in the same directory as your project file (if you're using an IDE), or in the same directory as your executable file (.exe if windows).