#include <iostream>
#include <vector>
using namespace std;
template <class type> type GetMaximum(vector<type> a)
{int length=a.size();
type temp=a[0];
for(int i=1;i<length;++i)
{
if(temp<a[i])
temp=a[i];
}
return temp;
}
void main()
{
vector<int> test1(10);
for(int i=0;i<10;i++)
test1[i]=i;
int max1=GetMaximum(test1);
cout<<"测试数组1最大的数为:"<<max1<<endl;
vector<double> test2(10);
for(int i=0;i<10;i++)
test2[i]=i+0.5;
double max2=GetMaximum(test2);
cout<<"测试数组2最大的数为:"<<max2<<endl;
system("pause");
}