Suppose we have a base class A
and derived class B
.
A
implements a virtual method foo()
which is overloaded in B
.
If we have an object test
of type B
, then the object would surely contain both implementations of foo()
. When we call the method, how is the correct (most derived) method found?
Would the vptr contained in the base class come into use perhaps...?