+ 2
Do inherited classes also inherit the private members (methods, variables, etc...)?
3 Réponses
+ 5
Yes, they do. But you can not access them from derived class.
So if your base class have a public or protected function, that works with private members, it still work in derived class.
+ 2
ok thanks :)
+ 1
private members of class won't inherit.