- 7
- 0
- 约1.36万字
- 约 18页
- 2019-03-05 发布于湖北
- 举报
Huffman
#include iostream.h
#include iomanip.h
#include string.h
#include malloc.h
#include stdio.h
//typedef int TElemType;
const int UINT_MAX=1000;
char str[50];
typedef struct
{
int weight,K;
int parent,lchild,rchild;
}HTNode,* HuffmanTree;
typedef char **HuffmanCode;
//-----------全局变量-----------------------
HuffmanTree HT;
HuffmanCode HC;
int w[50],i,j,n;
char z[50];
int flag=0;
int numb=0;
// -----------------求哈夫曼编码-----------------------
struct cou{
char data;
int count;
}cou[50];
int min(HuffmanTree t,int i)
{ // 函数void select()调用
int j,flag;
int k=UINT_MAX;
原创力文档

文档评论(0)