0
variable is ambiguous
https://code.sololearn.com/ccinhk7Wi6SV/?ref=app I'm trying to stop the while loop if "end" is equal to 1. If the goblin and ninja die, end is now equal to 1 (ending the loop). I'm trying to implement this but it keeps saying "end is ambiguous". How do I fix this? Sorry if the code is too long, it's a big one. Check out line 180 and line 29 for my problem.
2 Respuestas
+ 2
In namespace std, there is a function std::end()...
That's why it is ambiguous...
Just assign it another name, like flagEnd...
+ 3
This is why people strongly recommend to not use 'using namespace std;' :)