www.pudn.com > compressor.zip > main.cpp
#include"WordCompressor.h" #include"Frequent.h" #includeunsigned long hashfunc(const chNode&cn) { return ((int)cn.ch)%11; } void main() { char ch[100]; int Freq[100]; int m=0; HashTable HTable(12,hashfunc); Frequent f; int n=1; char c; do{ WordCompressor Word(ch,Freq,m); Word.Instructions(); Word.Application(); if(n){ f.Analyze("words.txt",HTable); HTable.Summary(ch,Freq,m); n--; } cout<<"ÊÇ·ñ¼ÌÐø--Y/N--? "< >c; cin.ignore(); }while(c=='Y'|| c=='y'); }