My problem is listed below. The header file is already provided below but it doesn't seem to be complete? It doesn't have any constructors or a destructor. I've built a choice menu for the user to pick from and need to program the following:
a) Read from a text file and store the information into a student records class array. Delete the information and start over if this option is chosen again.
-Question: The header file has a static variable for filePath_ but I'm not sure how to incorporate it in my code here.
b) Allow manual entry from standard input and store the information in the same student records array. First it needs to check if the record already exists by comparing the first and last name. This option uses the AddEntryFromConsole() function and I'm not sure how to incorporate the operator == function with this.
c) print records to standard output - I don't think this should be an issue once I have the rest figured out.
Finally, my main.cpp file is to have very little code and functions should be defined in my StudentRecords.cpp file; however, that means they would need to be declared in my StudentRecords.h file, correct? That is why I think this provided header file is not complete. Also, we are not using pointers or vectors in this assignment.
Thank you,
Casandra
Create a simple student database application. It must use the following StudentRecord class. This comprises the contents of the header file StudentRecord.h. For full credit on this assignment you must use this header file (it is OK to use the string type instead of character arrays).
const int ENTRY_SZ = 256;
struct DateType
{
unsigned int year_;
unsigned int month_;
unsigned int day_;
};
class StudentRecord
{
private:
char firstName_[ENTRY_SZ];
char lastName_[ENTRY_SZ];
int idNum_;
char major_[ENTRY_SZ];
char minor_[ENTRY_SZ];
DateType dob_;
public:
static int entryCnt_;
static char filePath_[ENTRY_SZ];