C 引用报错
- C/C++ code
#include <stdio.h>#include <stdlib.h>void Exchg1(int &x, int &y){ int tmp = x; x = y; y = tmp; printf("x = %d, y = %d.\n", x, y);}main(){ int a = 4, b = 6; Exchg1(a, b); printf("a = %d, b = %d.\n", a, b); getch();}编译执行之后报错。哪位帮忙看看。。
[解决办法]
C里面好像没有引用这玩意,只有指针