void PrintTree(MyHuffmanNode* root, int n)
{
if (root == NULL)
return;
for (int i=0;i<n;i++)
{
cout<<" ";
}
if (root->father==0)
{
cout<<"|_";
}
else
{
cout<<" ";
}
cout<<root->data<<endl;
PrintTree(root->lchild, n+2);
PrintTree(root->rchild, n+2);
}
错误信息error: invalid conversion from int' to
MyHuffmanNode*'
error: initializing argument 1 of `void PrintTree(MyHuffmanNode*, int)'
lchild, rchild都是整形的变量,root是指针,怎样建立联系啊,请大家帮帮忙,谢谢。