struct identifer{ datatype identifier; datatype identifier; ... };
enum StatusT {FRESHMAN, SOPHOMORE, JUNIOR, SENIOR, GRADUATE}; struct AddressT { string street1, street2, city, state; int zip; }; struct StudentT { string name; int age; float gradePointAverage; StatusT class; AddressT address; };
StudentT GetStudent(); void PrintStudent(StudentT person); int main() { StudentT person1, person2; ... }
StudentT person person.age = 19; person.class = SOPHOMORE; person.name = "Abe Student"; person.gradePointAverage = 4.0; ... cout << person.name; person.gradePointAverage = points/credits; person.age++;
person.address.state = "Pennsylvania"; cout << person.address.zip;