Now, we're not quite there because now we have two copies *b=temp of 2 so the last line of code says *b gets temp.
现在,我们还没有达到目的,因为现在我们有两个2的拷贝,最后一行指明。
temp = *a This line of code here, temp gets *a.
这一行代码。
So A gets 1, B gets 2, now the swap function itself starts executing line by line; so I declare a chunk of memory called temp.
所以A等于1,B等于2,现在swap函数自己开始,一行一行地执行,所以我声明了,叫做temp的一块内存。
应用推荐