0
How to subtract a value from a struct?
I have this code currently struct monster { short health, attack; monster() : health{50}, attack{10} { } }; How would I go about subtracting for sample 20 health so that the health becomes 30?
3 Réponses
+ 1
FIRST CREATE VARIABLE OF TYPE monster SUPPOSE M1.
THAN
M1.health - 20
+ 1
monster M1;
0
how would i create the variable