<s>《C陷阱与缺陷》运算符优先级错误！</s>
<s>引用 楼主 incident_a 的回复:书上说到双目运算符优先级的时候，是这样的： Next come the true binary operators.</s><s>The arithmetic operators have the highest precedence, then the shift operators, the relational operators, the logical operators, the assignment operators, and finally the conditional operator.</s><s>也就是说赋值运算符（=）优先级是高于条件运算符（？</s><s>：）的，往前翻了下书，明显不对啊，实际上应该是这样： ？</s><s>： assignments ， 最后应该是逗号运算符啊，难道书上写错了？</s><s>看了下，好像是有点问题。</s><s>我估计他的意思是， 对下面这类的表达式： 1<2 ?</s><s>1-1<<2:3; 运算符的优先级 是 1-1 0<<2 然后是 1<2 最后是返回。</s><s>这句话： Next come the true binary operators.</s><s>The arithmetic operators have the highest precedence, then the shift operators, the relational operators, the logical operators, the assignment operators, and finally the conditional operator.</s><s>改成 Next come the true binary operators.</s><s>The arithmetic operators have the highest precedence, then the shift operators, the relational operators, the logical operators, and finally the conditional operator.</s><s>就对了。</s><s>或者向你说的一样，改成： Next come the true binary operators.</s><s>The arithmetic operators have the highest precedence, then the shift operators, the relational operators, the logical operators, the conditional operator, the assignment operators , and finally the comma operator.</s>
