[Solved] Why is this for loop infinite?


if(r+1 != 9 && c+1 != 9 && realmap[r+1][c=1] ==10

I have no clue what any part of your code actually does or checks, but this will reset c to 1 every pass that the first two conditions are satisfied and thus cause an infinite loop.

0

solved Why is this for loop infinite?