The situation is like this.
class Interface
{
public:
virtual void foo() = 0;
}
class MyClass : Interface
{
public:
virtual void bar() = 0;
private:
void foo()
{
//Some private work and checks.
bar();
};
}
I want that my user will create a class which inherit from MyClass, and they will have to implement there bar()
.
But how can I enfoce they wouldn't override foo()
? because it's important to me to use my foo()
.