Let's say I have a sprite class. Sprite has draw() in it. There are many sub-classes of sprite (for example, monster1 and monster2).
Sprite's draw() has a basic generic rendering code.
monster1 does not define its own draw(), it uses the one it inherits from Sprite
monster2 has a special (redefined) draw().
I have vector<Sprite*> sprites
that is filled with tons of monster1s, monster2s, and so on.
My question - when I go through the vector and call every entry's draw() like so:
> There are many sub-classes of sprite (for example, monster1 and monster2).
that may be a misuse.
Consider using composition instead (a monster has an sprite)