P
Peteroid
Ok, what am I do wrong here. I created a class with a public method, and
when I try to create a new overload of it in a derived child class it won't
let me:
class Parent_Class
{
public:
long Method( const long x ) {}
} ;
typedef std:air<long,long> coords ;
class Child_Class : public Parent_Class
{
public:
long Method( const coords c ) {} // *error*
} ;
The error is something like "can't convert coords into a long", which looks
like it is interpretting the child version as a 'calling' of the parent
method instead of a 'new overload definition' with a different parameter
type. So, what is the problem here?
[==Peteroid==]
when I try to create a new overload of it in a derived child class it won't
let me:
class Parent_Class
{
public:
long Method( const long x ) {}
} ;
typedef std:air<long,long> coords ;
class Child_Class : public Parent_Class
{
public:
long Method( const coords c ) {} // *error*
} ;
The error is something like "can't convert coords into a long", which looks
like it is interpretting the child version as a 'calling' of the parent
method instead of a 'new overload definition' with a different parameter
type. So, what is the problem here?
[==Peteroid==]