#include class base { public: virtual void print (int a) { std::cout << \"a: \" << a << \" base\\n\"; }
Because double can be automatically converted to an int in the first definition it sees (in the base class)
See explicit keyword or this question
explicit