+ 2
No operators match these operands
i get this error under the <= signs and idk why please help https://code.sololearn.com/cs3iCShS4FYH/?ref=app
9 odpowiedzi
+ 3
after struct name you should not use ()
https://code.sololearn.com/cq0KMr71Acof/?ref=app
+ 3
you have to return 0 at the end.
also your if statement is wrong. the condition must be health.health . player(health) is wrong
+ 3
define more players like this:
player p1;
player p2;
player p3;
and if you have many players use array:
player players[100];
+ 2
thank you
+ 1
you can access each player's health with itsName.health. for example p2.health
+ 1
so you have to specify the index. player[2].health
0
but what if i have more then one plauer
0
how do i define which player takes damage and subtract that players health?
0
what if i make an array of players?