#Need help with C++ code
1 messages · Page 1 of 1 (latest)
What is the error, what are you trying to do
there is no syntax error. the program shows console screen. while printing round 1 it shows weapon, allows user to select weapons then when enemy is allowed to pick a weapon, after printing enemy attacking with damage : any value like 3, the program stops working
online debugger is giving me this : Program received signal SIGSEGV, Segmentation fault.
0x0000555555555a2c in Player::getHealth (this=0x0) at main.cpp:21
21 return health;
(gdb)
Do you know what a seg fault is?
a little idea, its related to memory ig
Could you post a screenshot of the code from int main to line 25 here im on mobile so hard to see