L
Lagarde s?bastien
Hello,
I have the following code
struct Toto
{
void Add(int x){}
};
struct Titi : public Toto
{
void Add(int x, int y){}
};
int main ()
{
Titi titi;
titi.Add(1);
}
and i get the following error msg :
main.cpp(19): error C2660: 'Titi::Add' : function does not take 1 parameters
if i change the code "titi.Add(1);" to "titi.Toto::Add(1);"
There is no more problem.
Is this a specific C++ behavior ? or my compiler (msvc7) ?
Is there a good way to write "titi.Add(1)".
I know i can wrap "Add" in Titi class and call Add Parent but
if i can avoid this...
Thanks.
I have the following code
struct Toto
{
void Add(int x){}
};
struct Titi : public Toto
{
void Add(int x, int y){}
};
int main ()
{
Titi titi;
titi.Add(1);
}
and i get the following error msg :
main.cpp(19): error C2660: 'Titi::Add' : function does not take 1 parameters
if i change the code "titi.Add(1);" to "titi.Toto::Add(1);"
There is no more problem.
Is this a specific C++ behavior ? or my compiler (msvc7) ?
Is there a good way to write "titi.Add(1)".
I know i can wrap "Add" in Titi class and call Add Parent but
if i can avoid this...
Thanks.