#include
using namespace std;
template
T fun(T a,T b,T c,T d,T e)
{T swap(T x, T y);
if(b if(c if(d if(e if(c if(d if(e if(d if(e if(e return 0;
}
T swap(T &x, T &y)
{int t;
t=x;
x=y;
y=t;
return 0;}
int main()
{int a1,b1,c1,d1,e1;
cin>>a1>>b1>>c1>>d1>>e1;
fun(a1,b1,c1,d1,e1);
cout<<a1<<","<<b1<<","<<c1<<","<<d1<<","<<e1<<endl;
return 0;
}我在执行的时候是说swap函数没有被指代,我开始觉得是重载函数的问题,但是去掉T,后面的x,y就没有被指代了,请问这是为什么呀?
C#个屁。你这代码是C++的吧。