Oh sorry, i meant to say public. And what i mean is i made the hero and monsters class inherit the character class because they are both characters in the game im trying to make, but how can i assign values to the getAttack function of hero and monsters individually?

like for example:

12345678

Characters h;
h.getAttack();//i want this to lets say be 3
Hero Me;
Me.getAttack();//and this like 5 or something
Monsters m;
m.getAttack();// and this 10