+ 1

I'm having trouble getting output from a function

I'm making a game in c++, and as of right now I'm creating a function that takes input from the user and acts on it(say for example you entered "heal", it would call the healing function). but when I try to test it, I get no output back. why is this? https://code.sololearn.com/crKaI3GC953C/?ref=app

26th Jul 2017, 4:48 PM
X-1
X-1 - avatar
1 ответ
+ 9
you are declaring new variables inside chose_action. they will always be blank. you will need to make these globals or an enum or something if u want to use them like you are trying. see int p_health etc
26th Jul 2017, 4:53 PM
jay
jay - avatar