mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-11-25 06:57:02 +08:00
Co-authored-by: nilbuild <4921183+nilbuild@users.noreply.github.com>
725 B
725 B
Virtual Tables
Virtual tables (vtables) are compiler-generated lookup tables used in C++ to implement dynamic polymorphism, especially with virtual functions. Each class that declares or inherits virtual functions has a vtable, which contains pointers to the most derived versions of those virtual functions for that class. When a virtual function is called through a pointer or reference to a base class, the vtable is consulted at runtime to determine the actual function to execute based on the object's dynamic type.
Visit the following resources to learn more: