< previous page page_782 next page >

Page 782
0782-01.gif
Figure 14-3
Array 
gradeBook with Records as Elements
The following code fragment prints the first and last names of each student in the class:
for (count = 0; count < length; count++)
    cout << gradeBook[count].firstName << 
         << gradeBook[count].lastName << endl;
Hierarchical Records
We have seen examples where the components of a record are simple variables and arrays. A component of a record can also be another record. Records whose components are themselves records are called hierarchical records.

 
< previous page page_782 next page >