Pergunta de entrevista da empresa SMART Technologies

How virtual methods are implemented in C++

Resposta da entrevista

Sigiloso

12 de fev. de 2014

When a class has virtual methods, it gains a vpointer to the class' vtable. At runtime, the vpointer is followed to the vtable, and from there the appropriate method is fetched.