I am writing a game in C++ which has different enemy types. I have defined a base Enemy class and I also have derived classes enemy1, enemy2 etc. Now for updating these enemies in each iteration of the game, I want to have an array: EnemyArray with its elements pointing to the existing enemies so that I can make sure to update them all with their own version of update(), etc.
One way of doing this, would be to define separate arrays for each enemy type and that would be a clean way of solving the problem. However, I was wondering if the fact that these enemy classes are all derived from the same base class makes it possible to somehow have my EnemyArray as an array of Enemy's and do some modifications later.