摘要:
/*构造哈夫曼数及哈夫曼编码*/#include<iostream>using namespace std;#define Maxlen 100typedef struct { int weight; int lchild,rchild,parent;}HTNode;typedef HTNode Hfmt[Maxlen];int n;void InitHfmt(Hfmt T){ int i; printf("\n\t\t请输入共有多少个权值(小于50):"); scanf(" %d",&n); getchar(); for(i=0;i 阅读全文