- 14
- 0
- 约4.7千字
- 约 8页
- 2017-12-22 发布于河南
- 举报
哈夫曼编码 数据结构课程设计
哈夫曼编码 数据结构课程设计
#include stdio.h
#include malloc.h
#include conio.h
#include string.h
#include stdlib.h
#define max 200
typedef struct huffmantree
{
int weight;
int parent;
int lchild;
int rchild;
}HT;
char a1[max];
int a2[max];
char a[max];
int n;
void writefile()
{
FILE *fp;
printf(\n请输入要编码的字符串:\n\n);
scanf(%s,a);
n=strlen(a);
if((fp=fopen(soucefile.txt,w))==NULL)
{
printf(文件打开失败!);
exit(0);
}
fprintf(fp,%s,a);
fclose(fp);
printf(\n\n你输入的字符已存入到文件soucefile.txt中!\n);
}
void select(HT *tree,int n,int *s1,int *s2)
{
int min1,min2,i=0;
min1=
您可能关注的文档
最近下载
- 北京现代-名图-产品使用说明书-名图1.6T自动旗舰型(国四)-BH7161PAY-名图1.6T产品使用说明书.pdf VIP
- kqsn300m27 型双吸离心泵设计.docx
- 中考数学 圆双填空-含答案.docx VIP
- 晋江市辅警考试题库2025.docx VIP
- 全球电商行业AI应用研究报告2025.docx VIP
- 项目资料管理检查表.pdf VIP
- 2025年中国PCB阻燃剂行业市场分析及投资价值评估前景预测报告.docx VIP
- 《新三字经》全文.pdf VIP
- 体例格式6:工学一体化课程《小型网络安装与调试》任务3学习任务分析表.docx VIP
- 2025年协警辅警招聘题库及答案.docx VIP
原创力文档

文档评论(0)