Code:
65 int BasicMonster::calculatePower() const
66 {
67 if (weight > stamina)
68 power -= (weight - stamina) * 2;
69
70 if (health <= 0)
71 power = 0;
72 else if (health > 100)
73 power += (health - 100) * 3;
74 else if (health < 10)
75 power *= health / 10.0;
76
77 return power;
78 }
Error 1 error C2166: l-value specifies const object 68
Error 2 error C2166: l-value specifies const object 71
Error 3 error C2166: l-value specifies const object 73
Error 5 error C2166: l-value specifies const object 75
Please, could you tell me what I have to write to not have errors?