Let's say I have a fist class
class Walker {
public:
Walker();
virtual ~Walker();
virtual void Step();
};
Then a second one, deriving from the former
class Mecha : public Walker {
public:
Mecha();
virtual ~Mecha();
private:
virtual void Step();
};
Is that private
modifier on Step()
any useful? Mecha::Step()
can still be called as Walker::Step()
, isn't it? Shouldn't there be a warning as I'm trying to change the nature of the super-class through the definition of its sub-class?