This is my first year taking a C++ class and I don't quite really understand a lot of whats going on. My teacher told us that we need to create a student database which is searchable by student ID. I don't know how to build it and I really need your help. Any help is much appreciated.
Create a student database which is searchable by student ID.
You will create an array of structs, which will include First Name, Last Name, Student ID, GPA and Grade Level.
struct Students
{
string fname, lname;
long studentID;
int grade;
double GPA;
}
Students myStudents[10];
The data will be imported from a data file into an array (10 items, see attached file student1.txt)
User the fstream library
ifstream, ofstream,
Once data is imported into the array a menu will be displayed to the user to search for student ID or 0 (zero) the program, using a Do-While loop.
Use this code to open, read and close from file into array:
myFile.open("student1.txt");