J
JenC
Hello,
I have a problem regarding multiple inheritance and name collision in
the base classes.
The problem looks like:
class BaseA
{
....
public:
virtual unsigned int Run();
....
}
class BaseB //note, BaseB is an abstract class
{
....
public:
virtual customType Run() = 0;
....
}
class Derived: public BaseA, public BaseB
{
....
public:
virtual customType Run(); //only need to implement/override
BaseB's Run()
}
The problem is that both base classes have a function Run(void)
differing only in their return types, and hence I get a compilation
error. Is there a way that I can specify that in class Derived I am
overriding BaseB's Run() method?
Changing the functions signature of BaseB::Run() is a last resort
option (BaseA cannot be changed), but it will affect a large amount of
code, so I would rather find a different less invasive solution. Any
ideas??
Thanks,
Jen Carlile
I have a problem regarding multiple inheritance and name collision in
the base classes.
The problem looks like:
class BaseA
{
....
public:
virtual unsigned int Run();
....
}
class BaseB //note, BaseB is an abstract class
{
....
public:
virtual customType Run() = 0;
....
}
class Derived: public BaseA, public BaseB
{
....
public:
virtual customType Run(); //only need to implement/override
BaseB's Run()
}
The problem is that both base classes have a function Run(void)
differing only in their return types, and hence I get a compilation
error. Is there a way that I can specify that in class Derived I am
overriding BaseB's Run() method?
Changing the functions signature of BaseB::Run() is a last resort
option (BaseA cannot be changed), but it will affect a large amount of
code, so I would rather find a different less invasive solution. Any
ideas??
Thanks,
Jen Carlile