class Base { public: Base() {} void Foo(int x) {...} }; class Derived : public Base { public: Derived(int args) { /* process args in some way */ Foo(result); } };
Is it allowed to call the base class method in the constructor of the derived class? I would suggest that this is normal, since the base object should be fully built, but I wanted to check just in case.
Is it allowed to call the base class method in the constructor of the derived class?
. virtual. , Derived, , Derived - Derived, , , . ( , BTW.)
virtual
Derived
, , , .
.
, : 1. 2.