Why vptr is not static?
问题 Every class which contains one or more virtual function has a Vtable associated with it. A void pointer called vptr points to that vtable. Every object of that class contains that vptr which points to the same Vtable. Then why isn't vptr static ? Instead of associating the vptr with the object, why not associate it with the class ? 回答1: The runtime class of the object is a property of the object itself. In effect, vptr represents the runtime class, and therefore can't be static . What it