nThe typeid operator relies on information stored in an object by the compiler whenever a direct or indirect base class contains a virtual function.
nThis operator is used at
run time to compare the type of an
object with the type of a known class.
nThe typeid operator
returns a reference to an object of type
type_info. This object contains a compiler dependent run time representation for a particular type.
nThis object can be
compared with the type_info of known
classes to determine the type at run time.
nThe header file <typeinfo> must be included to use
the typeid operator.