Private and public derivations of inheritance in Cpp?

All QuestionsCategory: Cpp LanguagePrivate and public derivations of inheritance in Cpp?
Chetan Shidling Staff asked 5 years ago

I need short information.

1 Answers
Chetan Shidling Staff answered 5 years ago

Private and public derivations:

class derived : private base     //private derivation
    {
members of derived
};

class derived : public base      //public derivation
{
members of derived
};

class derived : base           //private derivation by default
    {
members of derived
};