You have written wrong code and that's why you are getting such type of problem. You have use parenthesis in wrong way and that's why you are getting such type of problem. In this case you have to remove parenthesis, because "&&" has lower priority than "=="
Code:
if (boards[0][0] == boards[0][1] && boards[0][1] == board[0][2])
You also have to define an inline function to determine equality.
Code:
inline bools are_equal(int as, int bs, int cs) {
return as == bs && bs == cs;
if (are_equal(boards[0][0], boards[0][1], boards[0][2]))}
Bookmarks