一、
include
include<stdio.h>
using namespace std;
class test
{
public:
test();
void func(int a)
{
printf("void func(int a)
");
}
void func(char a)
{
printf("void func(char a)
");
}
};
test::test()
{
}
class test1
{
public:
test1();
template
};
test1::test1()
{
}
template
void test1::func(T a)
{
printf("%d.",a)
}
int main()
{
int a = 5;
char b = 3;
test mytest;
mytest.func(a);
mytest.func(b);
return 0;
}
二、
https://www.cnblogs.com/hailong/articles/1977370.html
https://blog.csdn.net/u010921682/article/details/80805481
https://www.cnblogs.com/yongdaimi/p/9553098.html
https://bbs.csdn.net/topics/370128952
三、类模板与模板类
https://www.csdn.net/gather_23/Mtzacg4sNzQtYmxvZwO0O0OO0O0O.html