Skip to content

Latest commit

 

History

History

Inheritance and Access

  • In public inheritance, all members are inherited with the same access levels as they had in the base class
  • In protected inheritance, all public members in the base class are inherited as protected
  • In private inheritance, all members in the base class are inherited as private
  • Generally, most use cases for inheritance should follow public inheritance, even though in C++ private would be the default