I'm working on an assignment that deals with inheritance and a heterogeneous list. The program is supposed to read in the contents of a file, which consists of student names, grades, and what type of class they're in (math, english, history), and then calculate final grades and output a summary to a file. I have a base class called Student, 3 derived classes, Math, English and History, and then a main program that does all the file reading and output. What I'm trying to do is create a virtual function and then call that function in the main program to do the output, once I read in all the data from the file.
I'm just not getting any output to the file. Does it need to return something? Currently I have it as a void function, taking in a char array, which is the name of the output file.
My code is too long to post the entire thing, but I'll gladly post snippets as needed. Any help would be great!