Overloading inherited functions?
Posted on 2003-10-31
I'm noticing what seems to me to be unusual behaviour but what is more likely just something I misunderstand.
Class B inherits from class A. Class A defines three overloads of void foo(), each with a single parameter.
Class B then defines three more void foo() overloads each with two parameters.
If, however, I try to use the single parameter version of foo() in Class B the compiler tells me there is no such thing.
B::foo no overloaded function takes 1 parameters
But if I comment out the new overloads of foo in class B it works like a charm.
Where am I going wrong? How do I accomplish this (extend the functionality of foo() from class A) in a way that will compile?
Thanks for any light you can shed on this!