I am a little bit confused by the vtable entries created by the compiler. As explained, for each class with virtual functions, the address of virtual functions is inserted into these tables. For a derived class from the base class, should the address(es) of its virtual functions in this vtable be its own virtual functions' addresses? If so, since vtable is created at compile time, this wouldn't be a dynamic dispatch at runtime.
Could somebody point out where the problem is?
Aucun commentaire:
Enregistrer un commentaire