Tag: Virtual Function
4 posts
-
"undefined reference to vtable": What the Linker Is Telling You and How to Fix It
Why GCC reports "undefined reference to vtable for X": the key function rule, undefined virtual destructors, unlinked .cpp files and Qt moc, and each fix.
-
C++ Virtual Functions: Polymorphism, override, and Pure
Virtual functions in C++: dynamic dispatch, virtual vs non-virtual, pure virtual and abstract classes, virtual destructors, vtables, and slicing pitfalls.
-
C++ VTable Explained: Virtual Function Tables & Dynamic Dispatch
How C++ vtables and vptrs implement polymorphism: indirect calls, object size, multiple inheritance costs, the missing-virtual-destructor leak, and optimization with final and NVI.
-
C++ override & final: Virtual Overrides and Devirtualization
C++ override and final: catching signature mistakes, sealing classes and virtual functions, devirtualization and performance notes, and practical.