Error:expression must be a modifiable Ivalue

Hello i'm new to c++ and i'm following the xoax.net c++ tutorials and now i'm trying to complete the tic tac toe game.
But i get this error : Error:expression must be a modifiable Ivalue
What does that mean and how can i fix it?
The error is in cSquare1 != '1'
1
2
3
4
5
6
if (cSquare1 != '1' && cSquare2 != '2' && cSquare3 != '3' &&
	cSquare4 != '4' && cSquare5 != '5' && cSquare6 != '6' &&
	cSquare7 != '7' && cSquare8 != '8' && cSquare9 != '9' && bGameOver = false)
{
	bGameOver = true;
}


If you need to see the rest of the code just tell me.
There's nothing wrong with the code you posted.
It would be good to see at least the declaration of cSquare1.
FYI, the I is actually an L.

bGameOver = false this is assignment, not comparision, use == for that.

But yeah, what is cSquare1?
Last edited on
well cSquare1 is
number 1 on the field and is changed to X or O's
char cSquare1('1');
Last edited on
Thanks i used == and it works now thanks :D
Topic archived. No new replies allowed.