If you don't declare the function virtual it will be statically bound, which means that as long as you access the derived objects through a base class pointer (or reference) the base class member will be used even if it being overridden in the derived class.