Run-time type identification (RTTI) is provided through two operators:
typeid operator, which returns the type of a given expression
dynamic_cast operator, which safely converts a pointer or reference to a base type into a pointer or reference to a derived type
These operators are useful when we have a derived operation that we want to perform through a pointer or reference to a base-class object and it is not possible to make that operation a virtual function. Ordinarily, we should use virtual functions if ...