D
Dhirendra Singh
class TestClass1
{
public:
int func1(int i, int j) { return 0; }
};
class TestClass2 : public TestClass1
{
public:
int func1(int i);
};
int TestClass2::func1(int i)
{
this->func1(i,1);
return 0;
}
When i compile it i get the error "too many arguments in function call
this->func1(i,1); "
when i change the name of the function func1 to func2 in TestClass2 it
compiles successfully.
I do not understand why ?
{
public:
int func1(int i, int j) { return 0; }
};
class TestClass2 : public TestClass1
{
public:
int func1(int i);
};
int TestClass2::func1(int i)
{
this->func1(i,1);
return 0;
}
When i compile it i get the error "too many arguments in function call
this->func1(i,1); "
when i change the name of the function func1 to func2 in TestClass2 it
compiles successfully.
I do not understand why ?