I have a base class with virtual function - int Start(bool)
In the derived there is a function with the same name but with a different signature -
int Start(bool, MyType *)
But Not virtual
In the derived Start()
, I want to call the base class Start()
int Derived::Start(bool b, MyType *mType)
{
m_mType = mType;
return Start(b);
}
But it gives compilation error.
"Start' : function does not take 1 arguments"
However Base::Start(b)
works
In C#, the above code works i.e the reference to Base is not required for resolving the call.
Externally if the call is made as follows
Derived *d = new Derived();
bool b;
d->Start(b);
It fails with the message:
Start : function does not take 1 arguments
But in C#, the same scenaio works.
As I understand the virtual mechanism cannot be used for resolving the call, because the two functions have different signature.
But the calls are not getting resolved as expected.
Please help