分类: C/C++
2011-11-25 21:21:40
#include
using namespace std;
template
T bigger(T val1,T val2)
{
return val1>val2?val1:val2;
}
int main()
{
int val1=2,val2=8;
cout<
getchar();
return 0;
}
-------------------------------------------------------------------------------
#include
using namespace std;
template
const T& bigger(const T& val1,const T& val2)
{
return val1>val2?val1:val2;
}
int main()
{
cout<
getchar();
return 0;
}