I am coding a program where the user enters the name of a student and the program looks for a file named [the student name] + .txt.
the code I use the read from the file looks like this:
To get file name I use this code
cout << ch;
Now, what I would like to do is take the "FindStudent" variable and make that the name of the file that its opening.
string FindStudent = "";
cout << "Student name:";
cin >> FindStudent;
FindStudent += ".txt";
Sorry if I did a bad job explaining that but I'm running on no sleep.