I am trying to make an array of different objects that are all inherited from one abstract class. Is this possible? Here's what I have:
Human *human;
human = new Human(100,100);
Cyberdemon *cyberDemon;
cyberDemon = new Cyberdemon(100, 100);
Balrog *balrog;
balrog = new Balrog(100, 100);
Elf *elf;
elf = new Elf(100, 100);
Human and Elf get inherited from Creature which is an abstract class. Cyberdemon and Balrog get inherited from Demon class which inherits also from Creature. What is the best way to make an array of these four objects?