rnode; //ht[i]作为双亲节点
ht[lnode].parent=i;ht[rnode].parent=i;
}
}
void CreateHCode(HTNode ht[],HCode hcd...[hc.start--]='1';
c=f;f=ht[f].parent; //再对双亲节点进行同样的操作
}
hc.start++; //start指向哈夫曼编码最开始字符
hcd...[i]=hc;
}
}
void DispHCode(HTNode ht[],HCode hcd[],int n0) //输出哈夫曼树编码
{
int i,k;
double sum=0,m=... 输出哈夫曼编码:\n"); //输出哈夫曼编码
for (i=0;i<n0;i++)
{
j=0;
printf(" %s:\t",ht[i].data);
for (k=hcd...d","e","f","g","h"};
double fnum[]={0.07,0.19,0.02,0.06,0.32,0.03,0.21,0.1};
HTNode ht[M];
HCode hcd