VS2010在编译C程序的时候遇到的问题

void swap(int &x,int &y)
{
int temp;
temp = x;
x = y;
y = temp;
}
/******************************************
主函数
*
*****************************************/
void main()
{
int a = 1,b = 2;
swap(a,b);
printf("%d %d",a,b);
while(1);
}
引用传参,编译不同过,不知道什么原因

编译错误是什么?
没看到你的include列表
可能你的include中某个头文件中也有swap方法。比如stl。