How would I go about declaring a global int in a header file, then manipulating it via addition and subtraction in the .cpp file. Every time I tried "health + 10" it returned an output of 0; yet when I used health++, or health = x, it would output correctly. Also, is declaring a global int in a header file to be manipulated in the .cpp file good practice?
> health + 20;
statement has no effect. You make an operation and discard the result.
if you declare staticint header; then each cpp would have its own copy of the variable
if you declare externint header; then they'll all work on the same variable (it must be defined once in only one cpp)