Your program requires several header files to be included in order to compile. For example you should have a line #include <iostream> in order to use the console input and output streams cin and cout.
Look at the following snippet:
1 2
Base** List = new Base*[numStudents]; //allocate space for array of students
What is a Base? Where is it defined?
Next since your class name can have spaces you'll need to insure that you remove the entire name from the file before you start extracting the numbers. This is probably what is causing you problems right now. It appears that you're only extracting the first part of a multiple word class name. You would be better off reading this entire line with getline, then processing the line with a stringstream, this will prevent causing errors in your file stream, which is probably what is happening now.
using something like string filename; /* then do this after the cout:*/ cin >> filename;
Also before starting anything make sure the file you want opens. Don't just start writing code.
Note make sure wherever you are saving your .cpp file is the same place as the file that you want to open.
Both files are opening, and the class name and student name is being read, but the grades are not being read, I do not know why the integers are not being read
Both files are opening, and the class name and student name is being read,
No, the class name is not being properly read. You only read one word of multi-word class names. This is the problem. You need to read the entire name, not just part of it.
Both files are opening,
How do you know this, you never check that the files opened properly. You should always check that the files properly opened and tell the user if they don't.