#include
using namespace std;
//类模板
template
class vector
{
public:
void sort(T a[],int n);
};
//排序
template
void vector
{
T temp;
for(int i =0; i < n; i++)
for(int j=0;j
{
temp = a[j];
a[j] = a[j+1];
a[j+1] = temp;
}
for( i = 1; i <=5; i++)
cout< }
void main()
{
double data1[5] = {5.5,4.4,3.3,2.2,1.1};
cout<<"排序前数组各元素为:"<
cout<
cout<<"排序后数组各元素为:"<
cout< char data2[5] = {'h','b','d','e','a'}; }
cout<<"排序前数组各元素为:"<
cout<
cout<<"排序后数组各元素为:"<
//for( i = 1; i <=5; i++)
//cout<



