64,681
社区成员
发帖
与我相关
我的任务
分享
template <class Object, typename KeyType>
class Com
{
bool comp(Object a, KeyType temp);
public:
void fun(KeyType temp){if(comp(a,temp)==true)....}
private:
Object a;
};
template< class KeyType >
bool Com<int, KeyType >::comp(int a, KeyType temp)
{
return true;
}