Yes, polymorphism will work if you define a method as virtual only in your base class. However, this is an agreement I came across while working with some large projects to always repeat the virtual keyword in method declarations in derived classes. This can be useful when you work with a large number of files with a complex class hierarchy (many levels of inheritance), where classes are declared in separate files. This way, you don't have to check which method is virtual, looking for a base class declaration when adding another derived class.
kamilm
source share