class Base {
public:
Base() {}
void Foo(int x) {...}
};
class Derived : public Base {
public:
Derived(int args) {
/* process args in some way */
Foo(result);
}
};
在派生类的构造函数中调用基类的方法是否允许? 我认为这是可以的,因为Base对象应该已经完全构建完成,但为了确保安全起见,我想进行确认。