tags:

views:

251

answers:

2

What does v indicate in vtable or vptr

+20  A: 

The 'v' stands for 'Virtual'.

Paul Betts
+8  A: 

The vtable is a common method by which virtual function calls are implemented. It contains pointers to a particular class instantiation's versions of any virtual functions that class implements. When you call a virtual function, the compiler will create code that loads it address from the vtable, and branches to that address.

Jeff Shattock
Technically not. The standard does not require a vtable. Nor is the vtable the only way to implement virtual functions. Therefore it is not how virtual functions are called. It is one implementation technique of how it could be done.
Martin York
Was the OP talking about a compiler that didn't use vtables?
Hans Passant