I am writing a card game in C++. I have a game class which keeps track of the players. I also have an abstract base class player, from which the classes person and computer derives.
I would like to keep the players in an array. The number of players is unknown at compile time. Because some players are persons and other computers, I need a player pointer for each, stored in an array, which is dynamically allocated because the number of players is unknown, right?
As I am relatively new to C++, I could not figure out how the syntax looks for this kind of thing.
std::vector.