Handling 'units' in an RTS game - c++
<p>I'm currently in the process of making a simple RTS style game in c++.</p>

<p>What i'm wondering is how to handle the creation of new units in the game (ie. making marines from the barrack). How would i store these units?</p>

<p>I was thinking of having a class 'unit' which would then be inherited by specific unit types (ie. marines, firebats, etc) but if i create an array for these (ie. Marines myMarines[20]) that will create a hard cap on these units.</p>

<p>How do i create such an array that can be expanded at will?
Thank you!</p>
