Check out example codes for "how to know the correct class of objects cpp". It will help you in understanding the concepts better.

Code Example 1

TYPE& dynamic_cast<TYPE&> (object);
TYPE* dynamic_cast<TYPE*> (object);

Learn ReactJs, React Native from akashmittal.com