class new_linkage: private mylinkage { int val; };
The specifier private here makes the attributes of mylinkage inherited by new_linkage objects appear as private members, i.e. no previously public or protected attributes of mylinkage can be accessed directly outside this new class. The following table summarises this.
Access in base class | |||
---|---|---|---|
private | protected | public | |
Modifier specified | |||
private | Inaccessible | private | private |
protected | Inaccessible | protected | protected |
public | Inaccessible | protected | public |