#include<iostream>
#include<iomanip>
using namespace std;
template<class t> // 函数作为模板使用时,需要将其当成一个整体,不分函数头和实现,因为只有在实现时才会生成目标代码
void sorting(t *exam,int n)
{
for(int i=0;i<n;i++)
{
cout<<"exam"<<"["<<i<<"]:"<<exam[i]<<endl;
}
}
int main(void)
{
float a[3]={2.3,3.5,4.6};
sorting(a,3);
return 0;
}