Suppose I have some code like this:
class Base {
public:
virtual int Foo(int) = 0;
};
class Derived : public Base {
public:
int Foo(int);
virtual double Foo(double) = 0;
};
class Concrete : public Derived {
public:
double Foo(double);
};
If I have a object of type Concrete, why can I not call Foo(int)?
If I change the name of Foo(double) so that it isn't overloading Foo, then all is well and both methods are accessible, but this isn't what I want.
Similarly, if I remove Concrete class and implement Foo(double) in Derived, then both are accessible, but again, not what I want.