[GD-General] Overloading method in derived class
Brought to you by:
vexxed72
|
From: <sla...@e-...> - 2004-02-04 18:11:17
|
Hello all,
I know this is a C++ specific question but i don't know how=20
to search the answer in google.
I have the following code :
struct Toto { void Add(int x){} };
struct Titi : public Toto { void Add(int x, int y){} };
int main ()=20
{=20
Titi titi;
titi.Add(1);
}
And both MSVC 7 and gcc give me=20
error : 'Titi::Add' : function does not take 1 parameters
sure i could write titi.Toto::Add(1); and this will work but=20
i want to avoid such a pain.
is it a C++ specification problem or a compiler problem ?
Thanks
------------------------
Lagarde S=E9bastien
Neko entertainment
|