<分区>
Possible Duplicate:
Passing pointer argument by reference under C?
引用变量是C++的概念吗?它们在 C 中可用吗?如果在 C 中可用,为什么我的代码会出现编译错误?
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a = 10;
int b = 20;
int &c = a;
int &d = b;
return 0;
}
输出:
bash-3.2$ gcc test.c
test.c: In function `main':
test.c:12: error: parse error before '&' token
为什么?