且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为V [我++]未定义用C?

更新时间:2023-01-25 14:05:43

如果(A [++] =='X')本身是C.它细然而,语义不同:您原来的code仅增加 I 如果条件为真,而如果(A [++] == 'X')总是增加 I

if (a[i++] == 'x') by itself is fine in C. It is, however, semantically different: Your original code only increments i if the condition is true, whereas if (a[i++] == 'x') always increments i.