【发布时间】:2019-08-30 05:19:50
【问题描述】:
在我的演讲幻灯片的page 15 中有一个例子。
int x = 10;
increment_int(x); // can’t change the value of x
increment2_int(&x); // can change the value of x
我不明白为什么第一个函数increment_int(x) 不能改变x 的值。虽然我不知道这些函数究竟做了什么,但我猜它们是在增加一些参数。
【问题讨论】: