Everything the same as before, now we'll try using all that data. { vector A; A.push_back(new person("Lavinia", "Leopard", "55 Frog St.", "4046662233")): A.push_back(new person("Jim", "James", "987 Horse Rd.", "7364536475")): A.push_back(new person("Joe", "Jones", "123 Cat St.", "3051112222")): A.push_back(new person("Jemimah", "Jones", "123 Cat St.", "3051112222")): A.push_back(new person("Jimmy", "Jones", "123 Cat St.", "3051234321")): A.push_back(new person("Jilly", "Jones", "123 Cat St.", "3053242315")): A.push_back(new person("Anathema", "Hamsoup", "234 Dog Av.", "3057651243")): A.push_back(new employee("Colin", "Nostril", "234 Dog Av.", "9765432124", "34500", "manager")): A.push_back(new employee("Evangelina", "Smith", "17 Ant St.", "7253981256", "64250", "designer")): A.push_back(new employee("Lumpy", "Morris", "550 Bee St.", "7352749812", "52000", "secretary")): A.push_back(new employee("Ravioli", "Johnson", "99 Bat St.", "6364858272", "57500", "typist")): A.push_back(new criminal("Knuckles", "Badman", "77 Dark Lane", "9875674532", "burglary")): A.push_back(new criminal("Basher", "McRough", "245 Dog St.", "8272636451", "assault")): A.push_back(new criminal("Murgatroyd", "Madd", "591 Eel Way", "3547852371", "murder")): A.push_back(new banker("Arthur", "Arthropod-Smythe", "3 Rich Road", "1426378491", "57000000")): A.push_back(new banker("Melinda", "Machiavelli", "1 1st St.", "9872436472", "72500000")): 1) cout << "A[9]'s position is " << A[9]->position << "\n"; fails because A[9] was declared as a pointer to a person, and persons do not have positions. The computer doesn't know what we actually stored there 2) employee * e = (employee *) A[9]; cout << "A[9]'s position is " << e->position << "\n"; A traditional typecast succeeds, but is dangerous 3) employee * e = (employee *) A[3]; cout << "A[3]'s position is " << e->position << "\n"; That mistake causes a run-time error 4) employee * e = (employee *) A[15]; cout << "A[15]'s position is " << e->position << "\n"; Even worse - an undetected wrong answer 5) employee * e = dynamic_cast(A[9]); if (e == NULL) cout << "A[9] is not an employee\n"; else cout << "A[9]'s position is " << e->position << "\n"; A dynamic cast actually checks that it is safe.