#include#include #define n 5#define m (2*n-1)typedef struct{ int weight; int lchild,rchild,parent;}HTNode;typedef HTNode HuffmanTree[m];void InitHuffmanTree(HuffmanTree ht){ for(int i=0;i =0){ cd[--start]=(T[p].lchild==c)?'0':'1'; c=p; //继续上溯 } strcpy(H[i].bits,&cd[start]); }}