例子 #include <unordered_map> #include <algorithm> #include <string> using namespace std; struct A { int a = 1; }; struct B { int a = 2; }; struct C :public A, public B { }; int main() { C demo; cout << demo.A::a; } 内存大小 sizeof显示 8字节 编译 编译不通过、成员名不明确 显示访问 对象.父类::成员