afrei
October 11th, 2002, 02:40 AM
Assume the following situation:
class A
{
public:
A();
virtual ~A();
virtual void One();
virtual void One(int w);
virtual void Two();
};
class B : public A
{
public:
B();
virtual ~B();
void One(int w);
void Two(int w);
};
The function call:
B obj;
obj.One();
obj.Two();
results in an error:
function does not accept 0 parameter
The compiler doesn't find the appropirate function in the
base class A. Why??? Any ideas?
Just copying the base class functions to the derived class could not be a good solution, coz I had to edit the code of the derived class whenever I add or change a concerning function to the base class.
Many thanks for help.
Andrea
PS: I work with MS Visual C++ 6.0
class A
{
public:
A();
virtual ~A();
virtual void One();
virtual void One(int w);
virtual void Two();
};
class B : public A
{
public:
B();
virtual ~B();
void One(int w);
void Two(int w);
};
The function call:
B obj;
obj.One();
obj.Two();
results in an error:
function does not accept 0 parameter
The compiler doesn't find the appropirate function in the
base class A. Why??? Any ideas?
Just copying the base class functions to the derived class could not be a good solution, coz I had to edit the code of the derived class whenever I add or change a concerning function to the base class.
Many thanks for help.
Andrea
PS: I work with MS Visual C++ 6.0