📜  前增量与后增量 C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:53.549000             🧑  作者: Mango

代码示例2
b = x++;
// In this example suppose the value of variable ‘x’ is 5 then value of variable ‘b’ will be 5 because old value of ‘x’ is used.

b = ++y;
// In this example suppose the value of variable ‘y’ is 5 then value of variable ‘b’ will be 6 because the value of ‘y’ gets modified before using it in a expression.