// This provides an example of hierarchical structures: // structures that have other structures as members. #include using namespace std; enum Network { ABC, CBS, NBC, FOX, WB, ESPN }; enum Degree { BS, BA, ASSOC, PHD, MD }; struct Date { int month; int day; int year; }; struct Education { string college; Degree degree; }; struct Person { string lastName; string firstName; int age; Date dateOfBirth; Education ed; }; struct TelevisionShow { Person producer; string title; Network network; int channel; int year; }; void PrintDate(Date); int main() { Date d; d.month = 1; d.day = 31; d.year = 2007; PrintDate(d); return 0; } void PrintDate(Date x) { cout << "Month: " << x.month << endl; cout << "Day: " << x.day << endl; cout << "Year: " << x.year << endl; return; }