C++ 如何定义派生模板类的函数?

C++ 如何定义派生模板类的函数?,c++,templates,C++,Templates,我试图定义函数find from类fhashqpwfind。你能告诉我我做错了什么吗 我把“这是错误”放在编译器说的地方: 错误:模板参数的数目错误(1,应该是2) 模板 FHhashQPwFind类:公共FHhashQP { 公众: 常量对象查找(常量键类型和键); 受保护的: int myHashKey(constkeytype&key)const; int findPosKey(const KeyType&key)const; }; 模板 const Object fhashqpwfind

我试图定义函数find from
类fhashqpwfind
。你能告诉我我做错了什么吗

我把“这是错误”放在编译器说的地方:

错误:模板参数的数目错误(1,应该是2)

模板
FHhashQPwFind类:公共FHhashQP
{
公众:
常量对象查找(常量键类型和键);
受保护的:
int myHashKey(constkeytype&key)const;
int findPosKey(const KeyType&key)const;
};
模板
const Object fhashqpwfind::find(const JeyType&key)//下面是错误
{
}
我当然会试试

const Object FHhashQPwFind<Object, KeyType>::find(const KeyType & key)
当需要第二个参数KeyType时:

 FHhashQPwFind<Object, KeyType>
fhashqpwfind
写方法时。

我一定会试试

const Object FHhashQPwFind<Object, KeyType>::find(const KeyType & key)
当需要第二个参数KeyType时:

 FHhashQPwFind<Object, KeyType>
fhashqpwfind

编写方法时。

别忘了标记答案!没问题!别忘了回答!没问题!