About 277,000 results
Open links in new tab
  1. How are virtual functions and vtable implemented? - Stack Overflow

    Nov 5, 2014 · How are virtual functions implemented at a deep level? From "Virtual Functions in C++": Whenever a program has a virtual function declared, a v - table is constructed for the …

  2. What is a vtable in C++ - Stack Overflow

    59 V-tables (or virtual tables) are how most C++ implementations do polymorphism. For each concrete implementation of a class, there is a table of function pointers to all the virtual …

  3. c++ - Why do we need a virtual table? - Stack Overflow

    Dec 12, 2021 · Hence, you need something called a "virtual table" which is basically a table of function pointers. Each object that has virtual functions has a "v-table pointer" that points to …

  4. c# - Virtual method tables - Stack Overflow

    Mar 9, 2010 · The "virtual function table" or "virtual method table" is a list of method pointers that each class has. It contains pointers to the virtual methods in the class. Each instance of a …

  5. c++ - Undefined reference to vtable - Stack Overflow

    When a virtual function is called, the program follows the object's pointer to a vtable, goes to the entry associated with the desired function, then uses the stored function pointer to invoke the …

  6. What is the structure of virtual tables in C++? - Stack Overflow

    What structure vtab actually has for instance of type Tester? The mechanism of virtual dispatching is implementation-defined. vtable and vptr are not required by the C++ Standard and that …

  7. Does every class have virtual function table in C++

    Feb 28, 2012 · This table will hold the function address of all the virtual functions that are defined in the base class. Based on the actual object type, this address changes and the exact …

  8. When is a vtable created in C++? - Stack Overflow

    Nov 5, 2014 · When exactly does the compiler create a virtual function table? 1) when the class contains at least one virtual function. OR 2) when the immediate base class contains at least …

  9. derived class - Virtual Table C++ - Stack Overflow

    Feb 9, 2017 · I read a lot of people writing "a virtual table exists for a class that has a virtual function declared in it". My question is, does a vtable exists only for a class that has a virtual …

  10. What is the performance cost of having a virtual method in a C

    Mar 21, 2009 · 134 Having at least one virtual method in a C++ class (or any of its parent classes) means that the class will have a virtual table, and every instance will have a virtual pointer. So …