O'Reilly logo
  • Yuan Peng Chiang thinks this is interesting:

 virtual void speak() const { std::cout << "Mammal speak!\n"; }

From

Cover of Sams Teach Yourself C++ in 24 Hours, fifth edition

Note

sub-classes has to override this function. without virtual, base class's function will be called