C
Christopher
Where is the rule that explains why this will not compile? I've always
expected this to work, but it would appear that I haven't run into
this problem yet.
To resolve the problem, do I really need to override every single
method from the Base with the same name as the specific method I am
interested in overriding? I have a good 20 of them in production code.
A simple test case to reproduce what I am experiencing in more
complicated code:
class Base
{
public:
virtual void Foo()
{
}
void Foo(int x)
{
}
};
class Derived : public Base
{
public:
void Foo()
{
}
};
int main()
{
Derived * blah = new Derived();
blah->Foo(5);
delete blah;
return 0;
}
expected this to work, but it would appear that I haven't run into
this problem yet.
To resolve the problem, do I really need to override every single
method from the Base with the same name as the specific method I am
interested in overriding? I have a good 20 of them in production code.
A simple test case to reproduce what I am experiencing in more
complicated code:
class Base
{
public:
virtual void Foo()
{
}
void Foo(int x)
{
}
};
class Derived : public Base
{
public:
void Foo()
{
}
};
int main()
{
Derived * blah = new Derived();
blah->Foo(5);
delete blah;
return 0;
}