C++ virtual function from constructor [duplicate]

Because base is constructed first and hasn’t “matured” into a derived yet. It can’t call methods on an object when it can’t guarantee that the object is already properly initialized.

Leave a Comment