Sep 29, 2025 · 17 min read · C++ is a language that supports both compile-time (static) and runtime (dynamic) polymorphism. Understanding how virtual functions work under the hood is crucial for interviews. This article covers everything about vtable, vptr, and object slicing, i...
Join discussionMay 1, 2024 · 1 min read · WHAT IS VTable? It stands for "VIRTUAL TABLE". It is created by the compiler to support dynamic polymorphism. When class contain virtual function, compiler creates VTable for that class. WHAT IS Vptr? It stands for "VIRTUAL POINTER". It is a hidden p...
Join discussion