小编Mer*_*soy的帖子

'x + = x--'后的x是多少?

在执行下面的代码后发生了什么?

int x = 10;
x += x--;
Run Code Online (Sandbox Code Playgroud)

我期待结果19(将x添加到x然后将x减1)但结果为20.它如何在窗帘后面工作?谢谢你的回答.

c++ operators post-increment

0
推荐指数
1
解决办法
144
查看次数

标签 统计

c++ ×1

operators ×1

post-increment ×1