64,685
社区成员
发帖
与我相关
我的任务
分享
#include <iostream>
//using namespace std;
using std::cout;
using std::endl;
template <class T>
T min(T x,T y){
return (x<y)?x:y;
}
int main(){
int a=1,b=2;
double d1=3,d2=4;
cout<<"min:"<<min(a,b)<<endl;
cout<<"min:"<<min(d1,d2)<<endl;
system("pause");
return 0;
}