Electrical and Computer Engineering
11 of 17
UAH
CPE 112
Arrays of Records
•Many applications require a collection of records.
•Example:
•    const int MAX_STUDENTS = 150;
•      enum GradeType {A, B, C, D, F};
•      struct StudentRec
•      {
•         string stuName;
•         float  gpa;
•         int examScore[4];
•         GradeType courseGrade;
•      };
•
•      StudentRec gradeBook[MAX_STUDENTS];
•      int count;