Quote:
|
also what does = mean in an if statement?
|
"=" is an assignment. It also has a value, the value assigned.
So "if (a = b)..." means, Assign the value of b to a, then if that value is true (non zero) do something.
Don't feel bad. This is a common error even for experienced programers. The compilers don't complain because it is legal and sometimes done on purpose.