下面这样就对了#include
template
void
compare(t
a,t
b,t
c);
void
main(){
double
a1,b1,c1;
cout<<"给三个数赋值:";
cin>>a1>>b1>>c1;
compare(a1,b1,c1);
}template
void
compare(t
a,t
b,t
c){
//模板函数的定义
t
t1;
if
(a;
else
{t1=a;a=b;b=t1;}
if(a
else
{t1=a;a=c;c=t1;}
if(b
else
{t1=b;b=c;c=t1;}
cout<"<"<