As a follow up to this question: If I create a pure virtual interface class and split the implementing class into a header and source file, I get the following:
Interface:
class IDemo
{
public:
virtual ~IDemo() {}
virtual void OverrideMe() = 0;
};
Implementing class, header:
class Child : public IDemo
{
public:
virtual void OverrideMe();
};
Implementing class, source:
void Child::OverrideMe()
{
//doStuff
}
So I need to tpye the name of a method declared in the interface 3 times - which is not only cumbersome, but also confusing. Is there a nicer way to do this?