// derived_data_types_ex1.cpp /* Purpose: To demonstrate use of derived data types passing the instance to a function for compactness. Notice values are passed to an instance called "murph" in function called display... */ #include using namespace std; #include "derived_data_types_ex2.h" // include header file main() { struct Student murray = { 3457, {'A','B','A','C','B'}}; display(murray); } // End of main() program void display(struct Student murph){ int i; cout << endl << "Here are contents of the instance (called \"murray\") of" << endl; cout << "the object (named \"Student\"):" << endl << endl; cout << "Student number: " << murph.no << endl; cout << "Grades: " ; for (i = 0; i <= 5; i++) cout << murph.grades[i] << " "; cout << endl << endl; } // End of display() function