associative arrays in C++ for any class type?
void CreatePlayer(int num)
{
Player * Player1 = new Player(num);
listOfPlayers[num] = Player1;
}
I need a class that can accomplish the above. I'm familiar with associative arrays in higher (managed) languages, but C++ is driving me nuts. Everything seems convoluted when trying to understand which class to use, or what you need to do to get that class to operate with the simplicity of the above code.
Please Help!