Do I need to specify virtual on the sub-classes methods as well?

You do not need it, but marking it so may make your code clearer.

Note: if your base class has a virtual destructor, then your destructor is automatically virtual. You might need an explicit destructor for other reasons, but there's no need to redeclare a destructor simply to make sure it is virtual. No matter whether you declare it with the virtual keyword, declare it without the virtual keyword, or don't declare it at all, it's still virtual.


No you technically do not need to specify virtual. If the base method is virtual then C++ will automatically make the matching override method virtual.

However you should be marking them virtual. The method is virtual after all and it makes your code much clearer and easier to follow by other developers.


Virtual is automatically picked up on derived method overrides regardless of whether you specify it in the child class.

The main consequence is that without specifying virtual in the child it's harder to see from the child class definition that the method is in fact virtual. For this reason I always specify virtual in both parent and child classes.