Quote Originally Posted by hk_mp5kpdw View Post
Might not matter in this particular example as you're not using a generic Creature pointer to a Mammal object anywhere, but these:
Code:
class Creature {
  
  ~Creature(){
    std::cout << "Destroying Creature" << std::endl;
  }
  
  void eat(){
    std::cout << "Creature is eating" << std::endl;
  }
...should really be virtual.
Am I correct in thinking that a virtual method allows it to be overridden by derived classes?

So, if I created Dog class, the Creature and Mammal eat/destructor methods should be virtual?