![]() |
#2
S1401310222014-10-24 09:11
|
#include<iostream>
using namespace std;
void main()
{
void swap(int&x,int&y);
int a=3,b=5;
swap(a,b);
cout<<a<<' '<<b<<endl;
}
void swap(int&x,int&y)
{
int temp;
temp=x;
x=y;
y=temp;
}
程序很简单~但是每次运行结果却无法完成后a,b值得互换~难道因为环境问题