用了c++的模板,调用buildHuff()时出错,我是c++新手

template
HuffTree*
buildHuff(HuffTree** TreeArray, int count)
{
//用给定的数组建堆
**_ heap> *forest = new heap>(TreeArray, count, count);
**_
HuffTree* temp1, *temp2, *temp3 = NULL;

//利用堆建树
while (forest->size() > 1)
{
    temp1 = forest->removefirst();
    temp2 = forest->removefirst();
    temp3 = new HuffTree<Element>(temp1, temp2);

    forest->insert(temp3);  //put new tree back on list

    delete temp1;
    delete temp2;
}
return temp3;

}

错误列表:
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 C2664 “void heap>::insert(HuffTree *)”: 无法将参数 1 从“HuffTree *”转换为“HuffTree *” Huffman编码 c:\users\asus\desktop\huffman编码\huffman编码\huffman.h 333
错误 C2440 “=”: 无法从“HuffTree *”转换为“HuffTree *” Huffman编码 c:\users\asus\desktop\huffman编码\huffman编码\huffman.h 329
错误 C2440 “=”: 无法从“HuffTree *”转换为“HuffTree *” Huffman编码 c:\users\asus\desktop\huffman编码\huffman编码\huffman.h 330
错误 C2664 “heap *>::heap(heap *> &&)”: 无法将参数 1 从“HuffTree *
”转换为“HuffTree **” Huffman编码 c:\users\asus\desktop\huffman编码\huffman编码\huffman.h 322

https://zhidao.baidu.com/question/519854368.html