C++中 0^0,报错,reference to overloaded function could not be resolved;did you mean to call it?
C++中 0^0,报错,reference to overloaded function could not be resolved;did you mean to call it?
其他人气:908 ℃时间:2020-05-25 00:53:39
优质解答
^按位异或(Xor)是一种逻辑运算,对应位相同时为假,不同时是真的.
基本规则:
元 元 值
0 0 0
1 0 1
0 1 1
1 1 0
在计算机中,是二进制来计算的.
没有专门的二进制输出.
0000 ^ 0000 = 0000谢谢您的回答,我的代码是bool a=1,b=1;cout << a^b << endl;怎么都觉得没有问题啊?加个括号吧,cout<<(a^b)<
我来回答
类似推荐