input.c
来自「哈夫曼编码解码以及文档资料和Makefile文件。」· C语言 代码 · 共 25 行
C
25 行
#include "head.h"#include "struct.h"#include "declare.h"void Input(CharArr *ch){ HuffmanTree HT; HuffmanCode HC; int i; char temp; for(i=0;;i++) { getchar(); printf("Please input the word, end with '#':"); scanf("%c",&temp); if(temp=='#')break; ch->e[i].c=temp; printf("Please input the weight:"); scanf("%d",&ch->e[i].w); ch->size++; } HT=HuffmanCoding(HT, HC, ch);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?