mercredi 13 juillet 2016

A Base Class pointer can point to a derived class object. Why is the vice-versa not true?


A Base Class pointer can point to a derived class object. Why is the vice-versa not true without casting? Logically a base class would not have enough information of the derived class but a derived class should have the information of the base class as well. I am missing some basics here.

Aucun commentaire:

Enregistrer un commentaire