Explanation of pointer to the derived class. Learning base class pointer and derived class pointer with programming example.
We can use pointers not only to the base objects but also to the objects of derived classes.
A single pointer variable of base type can be made to point to objects belonging to a base as well as derived classes.
We can access those members of a derived class which are inherited from the base class by the base class pointer.
But we cannot access an original member of a derived class which are not inherited from a base class using a base class pointer.
We can access an original member of a derived class using a pointer of a derived class.
GTU - Computer Engineering (CE) - Semester 4 - 2140703 - Object Oriented Programming with C++ - Concepts of C++ - Introduction to Object Oriented Programming
Object-Oriented Programming with C++ PPTs are available here: http://www.darshan.ac.in/DIET/CE/GTU-...
This video is recorded by Prof. Rupesh Vaishnav ([email protected], +91-9428037452) at Computer Engineering Department of Darshan Institute of Engineering & Technology, Rajkot as per GTU Syllabus.
Darshan Institute of Engineering & Technology, Rajkot is a leading institute offering undergraduate, graduate and postgraduate programs in engineering. The Institute is affiliated to the Gujarat Technological University (GTU) and approved by the AICTE, New Delhi.
Visit us: http://www.darshan.ac.in
Write us: [email protected]
Facebook: / darshaninstitute.official
Twitter: / darshan_inst
Instagram: / darshan_inst