69,371
社区成员
发帖
与我相关
我的任务
分享
for (i=0;i<m;i++)
tree[i] = new huft[m];
#include <iostream>
using namespace std;
//...
typedef struct{
float weight;
int parent,lchild,rchild;
}huft, *hufmtree;
//...
void Hufmtree()
{
int i,j,p1,p2;
float small1,small2,f,maxval=10000.00;
int wpl=0;
printf("\n\t\t请输入%d棵树(叶子)的权值\nplease:\n\n",n);
for (i=0;i<m;i++)
tree[i] = new huft[m];
for (i=0;i<m;i++)
{ tree[i]->parent=0;
tree[i]->lchild=0;
tree[i]->rchild=0;
//...