typeid(expression) typeid(type_name)
#include <typeinfo> typeid(*department[i]).name(); if (typeid(*department[i]) == typeid(Manager)) . . .