Virtual class invokes base-class function instead of overwritten one

In reply to razer6:

There is mo B::run in your example. please edit it to show a complete executable example, including construction of the objects.