Private and public derivations of inheritance in Cpp?


Warning: Trying to access array offset on false in /home3/indiakep/public_html/wp-content/plugins/dw-question-answer/inc/Template.php on line 8
All QuestionsCategory: Cpp LanguagePrivate and public derivations of inheritance in Cpp?
Chetan Shidling Staff asked 6 years ago

I need short information.

1 Answers
Chetan Shidling Staff answered 6 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
};