// File: main3.C // // Second test for typeinfo.h #include #include #include #include "person3.h" void typer(Person *) ; main() { Person P("James Bond", 37) ; Student S("Peppermint Patty", 7, 1, 1.2) ; Faculty F("Newt Gingrich", 53, 12) ; Person *ptr ; int n ; cout << "Pick (1-3): " ; cin >> n ; if (n == 1) { ptr = &P ; } else if (n == 2) { ptr = &S ; } else { ptr = &F ; } ptr->id() ; typer(ptr) ; }