I am making a game of cards. At the begining I am asking for the number of players. Player is a class.
I was wondering how do I make an array of players.
Right now I have:
Player *listofplayers = new Player[size];
I get an error saying unknown array size declared.
On the other hand the below is perfectly fine.
int *i = new int[size];
Can you please explain the difference between the two?? And what the correct declaration is?
Thanks in advance.