#include <iostream>

struct Base
{
	virtual void f(int x)
	{
		std::cout << "Base::f(int) called with " << x << std::endl;
	}
	virtual void f(double x)
	{
		std::cout << "Base::f(double) called with " << x << std::endl;
	}
};

struct Derived
: Base
{
	void f(int x)
	{
		std::cout << "Derived::f(int) called with " << x << std::endl;
	}
};

int main()
{
	Derived d;
	Base &b = d;
	b.f(7);
	b.f(3.14);
}
