关于类继承的一些问题
class A {
public:
void f() {cout << "A: f()" << endl; h();}
private:
void h() {cout << "A: h()" << endl;}
};
class B : public A {
public:
void f() {this->A::f();}
private:
void h() {cout << "B: h()" << endl;}
};
int _tmain(int argc, _TCHAR* argv[])
{
B b;
b.f();
return 0;
}