M
Maurice Termeer
suppose i've got the following:
class a {
public:
virtual void f(int a);
};
class b : public a {
public:
void f(int a, int b);
};
Now I expected that if I had an object o of type b and I would call
o.f(1); that the method of class a would be invoked. However, if I try
this, the compiler says 'b::f does not take one parameter' (msvc++ 2005
beta 2).
How can I solve this? I want o.f(1) to call the method of a, and o.f(1,
2) to call the method of b.
Thanks in advance,
Maurice Termeer
class a {
public:
virtual void f(int a);
};
class b : public a {
public:
void f(int a, int b);
};
Now I expected that if I had an object o of type b and I would call
o.f(1); that the method of class a would be invoked. However, if I try
this, the compiler says 'b::f does not take one parameter' (msvc++ 2005
beta 2).
How can I solve this? I want o.f(1) to call the method of a, and o.f(1,
2) to call the method of b.
Thanks in advance,
Maurice Termeer