Hi guys!
In this code i used the derived object address
in my base class pointer! And we have to get base class information, but here we get derived object class information!!!! And the derived object class is in the base class pointer(there is no virtual function and polymorphism here) what do you think about this problem?
From a base class you can only access the base class methods. If a method is virtual when you call it it will use the actual child but that’s the only thing about it