大虾们帮我看看这C++代码
#include <iostream>using namespace std;
int A(int a,int b)
{
int z;
cout<<"交换前a="<<a<<"\tb="<<b<<endl;
z=a;
a=b;
b=z;
cout<<"交换后a="<<a<<"\tb="<<b<<endl;
return(a,b);
}
int main()
{
int x,y;
x=3;
y=4;
cout<<"交换前x="<<x<<"\ty="<<y<<endl;
A(x,y);
cout<<"交换后x="<<x<<"\ty="<<y<<endl;
return 0;
}
最后为什么x和y的值没交换???