The problem is that you are not separating your DECLARATION from your DEFINITION. Consider:
class player
{
private:
static int numPlayers;
public:
Player () {numPlayers ++; }
};
"numPlayers" "Player". - "Player:: numPlayers". :
int Player::numPlayers = 0;
- - Player:: numPlayers . , . , ...
".c", ".cpp", ".m", ".mm" "" (.. , DEFINITIONS). "" (.. , ). , Xcode, . , - , , , .
Xcode... , ; , . ".mm" , ".h", , ".h" , .