调试中的错误
#include<iostream.h>template<typename T>
void swap(T a[],int n)
{int i,j;
T t;
for(i=0;i<n-1;i++)
{for(j=i+1;j<n;j++)
{if(a[i]>a[j])
{t=a[i];a[i]=a[j];a[j]=t;}
}}
}
print(T a[],int n)
{int i=0;
for(;i<n;i++)
cout<<a[i]<<" ";
cout<<endl;}
void main()
{int i=0,j=0,k=0;
int a[]={5,8,2,6,58};
float b[]={5.5,85.4,5.2,42.5,4.5};
char c[]={'d','e','a','g','y'};
swap(a,5);
swap(b,5);
swap(c,5);
print(a,5);
print(b,5);
print(c,5);
}