请教一个c++模板的问题,“有多个重载函数 max实例与参数列表匹配”的错误
template <class T_1>
T_1 max(T_1 a, T_1 b)
{
cout << "Template Function" << endl;
cout << typeid(a).name() << " " << a << endl;
return a;
}
int _tmain(int argc, _TCHAR* argv[])
{
max(2.0,3.0); <--- 这里始终要报一个“有多个重载函数 max实例与参数列表匹配”的错误
cin.get();
return 0;
}