📅  最后修改于: 2022-03-11 14:57:44.797000             🧑  作者: Mango
struct A { void ohai() {} };
struct B: protected A {};
struct C: private A { friend int main();};
struct D: B { void test() { ohai();} };
struct E: C { void test() { ohai();} };
int main() {
A().ohai();
B().ohai();
C().ohai();
D().ohai();
return 0;
}