Basically, this program opens a file called "database.txt" and outputs its content on the screen. It read first name, middle initial, last name and grade and displays it on the screen. That's it. Here is my "database.txt" file:
Your class contains members of type std::string. You may not store an object of the class in a binary file the way you do. And you may not read an object of the class such a way. In this case members of type std::string have undefined values.
How would I fix it? All I really need to do is to store first names and last names in string, middle names in whatever data type and scores as doubles and show it in console.
It would be simpler to store objects of the class in a text file with using operator >>. Or you can store in a binary file but before storing an object you should convert members of type std::string to ordinary character arrays. That is you should store not the members of type std::string but their values.