Answer: In short use virtual functions! So don\'t actually use this as good design, but for learning purposes take a read!
I want to start off by saying I am using c++ a
For dynamic cast to work, any of the function in base class must be virtual, that mean base class must be used in polymorphic way.