⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.cpp

📁 该程序用VC实现了一个小型文件压缩与解压缩功能的程序
💻 CPP
字号:
#include"WordCompressor.h"
#include"Frequent.h"
#include<iostream.h>
unsigned long hashfunc(const chNode&cn)
{
	return ((int)cn.ch)%11;
}
void main()
{
	char ch[100];
	int Freq[100];
	int m=0;
	HashTable<chNode> HTable(12,hashfunc);
	Frequent f;	
	int n=1;
	char c;
	do{
		WordCompressor<char> Word(ch,Freq,m);
		Word.Instructions();
		Word.Application();

		if(n){
			f.Analyze("words.txt",HTable);
			HTable.Summary(ch,Freq,m);
			n--;
		}
		cout<<"是否继续--Y/N--? "<<endl;
		cin>>c;
		cin.ignore();
		
	}while(c=='Y'|| c=='y');
}




⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -