return the right value of an integer from another class c++
I have multiple classes. 2 of them are named ListPlayers and Player. Well you can see player more as a struct. It has the name of the player, the amount of money he still has (it's a poker game) also a previous and next, because I'm using doubly linked lists (this is needed as it is a school project). In the other class, ListPlayers, I keep track of how many players, I add them in a Doubly linked list, I add one human player and the player can choose against how many computer players, he want to play. Well now, my question. When I want to acccess all the players in a loop so I can deal the cards, I need to know to which player and how many. How many is generated in a function in ListPlayers, the function returns the integer. But when I call the function inside Player, it returns 0. It might be because I don't really understand want constructors are or when to use public or private memebers. Until this moment, everything works fine, so I guess I did everything right.

return the right value of an integer from another class c++
===

I have multiple classes. 2 of them are named ListPlayers and Player. Well you can see player more as a struct. It has the name of the player, the amount of money he still has (it's a poker game) also a previous and next, because I'm using doubly linked lists (this is needed as it is a school project). In the other class, ListPlayers, I keep track of how many players, I add them in a Doubly linked list, I add one human player and the player can choose against how many computer players, he want to play. Well now, my question. When I want to acccess all the players in a loop so I can deal the cards, I need to know to which player and how many. How many is generated in a function in ListPlayers, the function returns the integer. But when I call the function inside Player, it returns 0. It might be because I don't really understand want constructors are or when to use public or private memebers. Until this moment, everything works fine, so I guess I did everything right.
