1. ## Question about equity tests?

Ok, I've encountered my compiler telling me I possible inproporely assinged testing for equity. I know that '==' is the usual thing to test for equity.

But, what does this do then?
Code:
```if(1 = 2)
cout << "???... How?";```
The expression
Code:
`1=2;`
That isint valid is it? But then why is if(1=2)? Or is this doing something else rather than assinging 1's value 2?

Thank you!

2. Well I know that if they were both variables, it would assign the data from the variable on the right into the variable on the left. But with 2 numbers I am not sure.

It might temporarily change the value of 1 to 2, but the next time you do anything with the number it will be 1 still.

3. Ah I see. But does that cause this to be true?

Code:
```if(1=2)
cout << 1+1; //result is 4?
cout << 1+1 //Result 2 because its outside the if?```
Or does it only effect the red part?

4. I was just going to test it to see exactley what happens, and the compiler wont even let you. I think it is because it is a static value, a value that can't be changed. Kind of like trying to put a variables data into a string literal by doing the following.

char* MyVar = "Bye";
"Hello" = MyVar;

Have a little look into lvalues and rvalues