Modes of Inheritance
- Public mode: If we derive a sub class from a public base class. Then the public member of the base class will become public in the derived class and protected members of the base class will become protected in derived class. Private members of the base class will never get inherited in sub class.
- Protected mode: If we derive a sub class from a Protected base class. Then both public member and protected members of the base class will become protected in derived class. Private members of the base class will never get inherited in sub class.
- Private mode: If we derive a sub class from a Private base class. Then both public member and protected members of the base class will become Private in derived class. Private members of the base class will never get inherited in sub class.
To learn more about Inheritance , C++ , Programming .
Join TCCI @ Bopal and Satellite in Ahmedabad.
Call us @ 98256 18292.
Visit us @ http://tccicomputercoaching.com/
No comments:
Post a Comment