void player::equipItem(weapon weaponVar) { //scope resolution operator
//player.equippedWeapon = &weaponVar; //can't have player here
equippedWeapon = &weaponVar; // member functions have access to member variables
}
Eh, I'd argue for equippedWeapon being in either the private or protected section. But that really all depends on how complex you want to make your RPG. Is it only the player that knows what his weapon is? Or are there friendly classes that can see it as well, but maybe not modify it?
Yes, the OP's class does lack an interface of public functions. Well, the whole thing is very minimal at this stage, I gather the OP is starting out small, which is a good thing :+)
But protected variables are supposed to be a bad idea - even though they seem to be the easiest thing, they are just as bad as public variables.