我的 heap.h 文件包含:
bool insert(int key, double data);
Run Code Online (Sandbox Code Playgroud)
在我的 heapCPP.cpp 文件中,我有:
bool heap::insert(int key, double data){
bool returnTemp;
node *temp = new node(key, data);
returnTemp = insert(temp);
delete temp;
return returnTemp;
}
Run Code Online (Sandbox Code Playgroud)
但是,我收到一条错误消息,指出“成员函数“heap::insert”可能不会在其类之外重新声明。
c++ ×1