i have a a couple c++ interfaces like this:
struct IThese {
virtual void doThesethings() = 0;
}
struct IThose : public IThese {
virtual void doThoseOtherThings() = 0;
}
Notice that IThose implement their own method, but also implements those from the other interface, so the idea is that implementors of IThose will need to implement both
Question: do i need to redeclare doThesethings in IThose?
if not, what would happen if i did it? would it shadow the IThese method?
Presently
class IThoseis abstract class** and you don’t have to redeclaredoTheseThings()inside it. You can choose to implementdoTheseThings()insideclass IThose.If
doThesethings()is implemented inclass IThose, then it’s child class (which deriveIThose) may or may not implement it. But they must implementdoThoseOtherThings(), if they don’t want to be abstract.**abstract class: contains at least one pure
virtualmethod within it or via its base class