If a dynamic cast is deemed invalid, the cast operator returns a NULL
pointer. This is how we can
check if the cast operation is successful or not. However, dynamic cast can only applied to
polymorphic types. A polymorphic type is one that has at least one virtual method.