void player::operator=(player& obj) { if(name) delete [] name; name = new char[strlen(obj.getName())+1]; strcpy(name, obj.getName()); points = obj.getPoints(); }
player::player(const player& obj) { if(name) delete [] name; name = new char[strlen(obj.getName())+1]; strcpy(name, obj.getName()); points = obj.getPoints(); }