Public, Private, and Protected Inheritance

    技术2022-05-19  30

     

    In public inheritance , the members of the base retain their access levels: The public members of the base are public members of the derived and the protected members of the base are protected in the derived.

    In protected inheritance , the public and protected members of the base class are protected members in the derived clas

    s.

    In private inheritance , all the members of the base class are private in the derived class.


    最新回复(0)