keil C51 无法运行这样的程序吗? error C141: syntax error near '&'
voidswap(int&a,int&b){inttmp=a;a=b;b=tmp;}voidmain(void){intx=2,y=3;swap(x,y);}...
void swap(int & a, int & b)
{
int tmp = a;
a = b;
b = tmp;
}
void main(void)
{
int x = 2, y = 3;
swap(x, y);
} 展开
{
int tmp = a;
a = b;
b = tmp;
}
void main(void)
{
int x = 2, y = 3;
swap(x, y);
} 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询