下面的代码是什么意思?&
符号代表什么
?
布尔 x = 真; x& = (1 || 0);
x& = (1 || 0);
应该是x &= (1 || 0);
which mean x = x & (1 || 0);
which means x = x & 1
which means it ands 最低有效位。
x& = (1 || 0);
//^space cannot be here
&
错了,和之间不能有空格=
。
如果您的意思是&=
(复合运算符),那么表达式的意思是:
x = x & (1 ||0);
先做逻辑or
再做bit and
。它相当于:
x = x & 1;