The answer was merely removing virtual from the functions, e.g.
virtual
int run(A& a); // <---- line 9 above int run(B& b); // <---- line 21 above
Thanks everyone for the help.