类的成员函数是一个模板函数, 但把这个模板成员函数的定义放在类的外面,就怎么都通不过.
//类的成员函数是一个模板函数, 但把这个模板函数的定义放在类的外面,就怎么都通不过.
class type_a{ //类的接口在类中写.
public:
template<typename T1,typename T2> void paixu(T1 **p,const int size,T2 T1::*pt); //排序,T1是该类内部定义的数据类型, T2是某种普通数据类型
string str;
int val;
};
void type_a::paixu<typename T1,typename T2>(T1 **p,const int size,T2 T1::*pt) //成员函数的实现写在类的外面. 但编译通不过. 不知道错在哪里
{}
------------------Configuration: - Win32 Release--------------------
Compiling...
mian.cpp
E:\我的文档\Visual C \StoClass_2.h(1104) : fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 1786)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
执行 cl.exe 时出错.
mian.obj - 1 error(s), 0 warning(s)