It is of course possible to have TWO DIFFERENT virtual functions that are different only in the arguments they take, e.g.
Code:
struct coord
{
int x;
int y;
}
class base
{
public:
virtual void vfunc(int x, int y);
};
class derived: public base
{
public:
virtual void vfunc(int x, int y);
virtual void vfunc(coord &c);
}
void base::vfunc(int x, int y)
{
... code here
}
void base::vfunc(coord &c)
{
vfunc(c.x, c.y);
}
void derived::vfunc(int x, int y)
{
... code here
}
Note that since the base::vfunc(coord &) calls the virtual vfunc(int, int) form, it will automatically call the derived::vfunv(int, int).
--
Mats