title: How do upcasting and vtables work together to ensure correct dynamic binding?
body: <p>So, <code>vtable</code> is a table maintained by the compiler which contains function pointers that point to the virtual functions in that class.</p>
  
  <p>and</p>
  
  <p><strike>Assigning a derived class's object to an ancestor class's object is called up-casting.</strike></p>
  
  <p>Up-casting is handling a derived class instance/object using a base class pointer or reference; the objects are not "assigned to", which implies an overwriting of value ala operator= invocation.<br>
  (Thanks to: <a href="https://stackoverflow.com/questions/26751035/how-do-upcasting-and-vtables-work-together-to-ensure-correct-dynamic-binding?noredirect=1#comment42086014_26751035">Tony D</a>)</p>
  
  <p>Now, how it is known at run time "which" class's virtual function is supposed to be called?  </p>
  
  <p><strong><em>Which entry in vtable refers to the function of "particular" derived classes which is supposed to be called at run time?</em></strong></p>