Im trying to create a weapon class to determine the damage each weapon will inflict on an opponent. For this example, I only want to do 1 weapon an axe.
Basically below I want to create a damage of 20 for the axe and decrease the cpu health points from 100 to 80(with the 20 damage taken)
#include <iostream>
using namespace std;
class weapon
{
char Axe = 20;
};
int main ()
{
cpu;
cpu = 100;
cpu = cpu - weapon.Axe
cout << cpu << endl;
cin.get();
}