Code:

class Player
{
public:
Player();
~Player();
int SetStat(char* stat, int level);
int DispStat(char* stat);
int GetStat(char* stat);
void DAStats();
private:
int HP, MaxHP, MP, MaxMP, AGI, CHR, CON, INT, STR, WIS, GP, XP, LVL;
};
Player::Player() {}
Player::~Player() {}
int Player::SetStat(char* stat, int level)
{
if (strcmp(stat, "HP") == 0)
{
HP = level;
}
if (strcmp(stat, "MaxHP") == 0)
{
MaxHP = level;
HP = MaxHP;
}
if (strcmp(stat, "MP") == 0)
{
MP = level;
}
if (strcmp(stat, "MaxMP") == 0)
{
MaxMP = level;
MP = MaxMP;
}
if (strcmp(stat, "AGI") == 0)
{
AGI = level;
}
if (strcmp(stat, "CHR") == 0)
{
CHR = level;
}
if (strcmp(stat, "CON") == 0)
{
CON = level;
}
if (strcmp(stat, "INT") == 0)
{
INT = level;
}
if (strcmp(stat, "STR") == 0)
{
STR = level;
}
if (strcmp(stat, "WIS") == 0)
{
WIS = level;
}
if (strcmp(stat, "GP") == 0)
{
GP = level;
}
if (strcmp(stat, "XP") == 0)
{
XP = level;
}
if (strcmp(stat, "LVL") == 0)
{
LVL = level;
}
return(0);
}
int Player::DispStat(char* stat)
{
if (strcmp(stat, "HP") == 0)
{
std::cout << HP;
}
if (strcmp(stat, "MaxHP") == 0)
{
std::cout << MaxHP;
}
if (strcmp(stat, "MP") == 0)
{
std::cout << MP;
}
if (strcmp(stat, "MaxMP") == 0)
{
std::cout << MaxMP;
}
if (strcmp(stat, "AGI") == 0)
{
std::cout << AGI;
}
if (strcmp(stat, "CHR") == 0)
{
std::cout << CHR;
}
if (strcmp(stat, "CON") == 0)
{
std::cout << CON;
}
if (strcmp(stat, "INT") == 0)
{
std::cout << INT;
}
if (strcmp(stat, "STR") == 0)
{
std::cout << STR;
}
if (strcmp(stat, "WIS") == 0)
{
std::cout << WIS;
}
if (strcmp(stat, "GP") == 0)
{
std::cout << GP;
}
if (strcmp(stat, "XP") == 0)
{
std::cout << XP;
}
if (strcmp(stat, "LVL") == 0)
{
std::cout << LVL;
}
return(0);
}
int Player::GetStat(char* stat)
{
if (strcmp(stat, "HP") == 0)
{
return(HP);
}
if (strcmp(stat, "MaxHP") == 0)
{
return(MaxHP);
}
if (strcmp(stat, "MP") == 0)
{
return(MP);
}
if (strcmp(stat, "MaxMP") == 0)
{
return(MaxMP);
}
if (strcmp(stat, "AGI") == 0)
{
return(AGI);
}
if (strcmp(stat, "CHR") == 0)
{
return(CHR);
}
if (strcmp(stat, "CON") == 0)
{
return(CON);
}
if (strcmp(stat, "INT") == 0)
{
return(INT);
}
if (strcmp(stat, "STR") == 0)
{
return(STR);
}
if (strcmp(stat, "WIS") == 0)
{
return(WIS);
}
if (strcmp(stat, "GP") == 0)
{
return(GP);
}
if (strcmp(stat, "XP") == 0)
{
return(XP);
}
if (strcmp(stat, "LVL") == 0)
{
return(LVL);
}
return(-1);
}
void Player::DAStats()
{
std::cout << "HP: " << HP << " / " << MaxHP << "\n";
std::cout << "MP: " << MP << " / " << MaxMP << "\n";
std::cout << "AGI: " << AGI << "\n";
std::cout << "CHR: " << CHR << "\n";
std::cout << "CON: " << CON << "\n";
std::cout << "INT: " << INT << "\n";
std::cout << "STR: " << STR << "\n";
std::cout << "WIS: " << WIS << "\n";
std::cout << "GP: " << GP << "\n";
std::cout << "XP: " << XP << "\n";
std::cout << "LVL: " << LVL;
}