What happends here, and how do i get around it?
Code:
class Base
{
public:
int foo(int, int)
{
//implemented
}
virtual int foo(int) = 0;
};
class Concrete: public Base
{
public:
virtual int foo(int)
{
//implemented
}
};
Creating a Concrete object my compiler does not resolve the
foo(int,int) method.
I get the following error using VS.net 2003.
Code:
foo' : function does not take 2 arguments
I guess i could solve it doing something like
Code:
class Base
{
public:
virtual int foo(int, int)
{
//implemented
}
virtual int foo(int) = 0;
};
class Concrete: public Base
{
public:
virtual int foo(int)
{
//implemented
}
virtual int foo(int x,int y)
{
return Base::foo(x,y);
}
};
But i think that should not be necessary?
Help!