I am trying to overload (change the argument list) the method of a parent class within the child class. When I do that, the parent class version of the method stops being "declared". I am very surprised by this and am wondering if it's a compiler bug or within the C++ specs. If it is part of the specs, anyone know why it's like that?
Here's some sample code:
Expand|Select|Wrap|Line Numbers
- class Parent
- {
- public:
- void Test() {}
- };
- class Child : public Parent
- {
- public:
- int Test(int Value) {return(Value);}
- };
- int main(int argn, char *argc[])
- {
- Child a;
- a.Test();
- ]
Expand|Select|Wrap|Line Numbers
- Error 1 error C2660: 'Child::Test' : function does not take 0 arguments e:\nexgen\tests\test\test\main.cpp 45
Thanks guys!
J-O