Prefix operators:
-increment the value,
-then return a reference.
Postfix operators:
-create a copy of the variable,
-increment the value,
-then return the copied value from BEFORE the increment.
本文详细解释了前缀和后缀运算符的工作原理。前缀运算符首先增加变量的值,然后返回更新后的引用;而后缀运算符则先创建变量的副本,增加变量值之后再返回增加前的副本值。
Prefix operators:
-increment the value,
-then return a reference.
Postfix operators:
-create a copy of the variable,
-increment the value,
-then return the copied value from BEFORE the increment.

被折叠的 条评论
为什么被折叠?