请教个C++问题# Programming - 葵花宝典
f*w
1 楼
有一个基类,内含私有成员函数,想在继承类内调用基类的私有成员,有办法吗?
for example,
class A{
private:
void f(){cout <public:
A(){}
};
class B:public A{
public:
B() {
// how to call A::f() here?
}
};
可以实现吗?
for example,
class A{
private:
void f(){cout <public:
A(){}
};
class B:public A{
public:
B() {
// how to call A::f() here?
}
};
可以实现吗?