What you are doing currently is like creating a person who is holding a bucket, having him step into his bucket, and then on the next iteration of your loop creating a new person and having him step into his bucket. On the 10th iteration (not the 11th) you create a 10th person and have him step into his bucket. The other 9 people are ignored and forgotten at this point. So when you tell that 10th person to reveal how many people are in the bucket, he only sees himself.
You are confusing the logic of the list here. You want to have a list that contains Players, but what you are doing is creating a player who contains a list.
The class itself is mostly ok, but unless you want each player to have access to the list that it is in, you don't need to include the std::list<Player*> player_list.
Instead, in main you would want to create a list
Code:
int main()
{
std::list<Player *> p_list;
Then in your while loop you can create new Players and add them to this list
Code:
int i = 0;
while (i != 10)
{
Player *entity = new Player;
// set the player info here
p_list.push_back(entity);
i++;
}
Now you probably wouldn't want to task any individual player in the list with reporting the size of the list (how many players it contains) so you would just print the p_list.size().
Code:
std::cout << "There are " << p_list.size() << " players in the linked-list" << endl;
return 0;
}
If you want to encapsulate handling how many players are in the list in a class, then you would probably want to create another class to manage the list of players. This new class would have a std::list<Player *> member, and in your while loop you would tell this class to add the Player you create and initialize in the while loop.