C 与 C++ 代码生成
第十一课
Reference 与 Pointer
Swap Example
void foo() {
int x;
int y;
x = 11;
y = 17;
swap(&x, &y);
}
void swap (int *ap, int *bp) {
int temp = *ap;
*bp = *ap;
*ap = temp;
}

Simpler Example

c++ Class

参考资料
Last updated
