C++ Pointers To Derived Classes
We know that pointers are used for an object of derived classes, we can also use them for the base objects. The pointer to the base class object is type-compatible (can be used in two ways) with a pointer to the object of the derived class. To access the variable of the base class, a base … Read more