class Base {
public:
Base() {}
void Foo(int x) {...}
};
class Derived : public Base {
public:
Derived(int args) {
/* process args in some way */
Foo(result);
}
};
是否允许在派生类的构造函数中调用基类的方法?我想这很好,因为应该完全构建 Base 对象,但我想检查一下以防万一。