Polymorphism means that a single function can have a number of different implementations.
polymorphism occurs when there is a hierarchy of classes and they are related by inheritance.
second step to create Ninjas and Monsters. Both of these new classes inherit from the Enemy class, so each has an attack power. At the same time, each has a specific attack function.
create our Ninja and Monster objects in main. We've now created two pointers of type Enemy, pointing them to the Ninja and Monster objects.
the pointer demonstrates, that you can use the Enemy pointer without actually knowing that it contains an object of the subclass