且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为什么派生类没有vtable指针而使用基类的vtable?

更新时间:2023-11-11 18:17:58

使用基类的vtable。整个点是看起来像基类,但在vtable中有不同的条目。因此,它是多态的不同的行为。

It has to use the base class's vtable. The whole point is it looks just like a base class, but has different entries in the vtable. Hence it's polymorphicly different behaviour.