+ 1
What happens to private or protected inheritance?
1 Resposta
+ 4
If the inheritance is protected, only Child, and its children, are aware that they inherit from Base.
If the inheritance is private, no one other than Child is aware of the inheritance.
So, basically:
public -> base class's public members will be public (usually the default)
protected -> base class's public members will be protected
private -> base class's public members will be private