继承中的隐藏概念

#include <iostream>
#include <stdlib.h>

using namespace std;

class A
{
public:
int age;
void test()
{
cout << "A()" << endl;
}
};

class B : public A
{
public:
int age;
void test()
{
cout << "B()" << endl;
}

};

int main()
{
B b;
b.A::test();


system("pause");
return 0;
}

原文地址:https://www.cnblogs.com/Froger/p/7507371.html