测试代码:
#include<iostream>
using namespace std;
template<class X>void func(X a)
{
cout<<"In func_one/n";
}
template<class X>void func(X a,X b)
{
cout<<"In func_two/n";
}
int main()
{
int a=0,b=0;
func(a);
func(a,b);
return 0;
}
测试结果:
In func_one
In func_two
请按任意键继续. . .