a1==b1==c1=='X'
This doesn’t do what you think it does. It compares a1
to the boolean result of b1==c1=='X'
, probably giving false
.
To check whether they are all equal, you need
a1=='X' && b1=='X' && c1=='X'
solved Tic-Tac-Toe Game c++ [closed]