?? huf.cpp
字號:
// Huf.cpp: implementation of the Huf class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Huf.h"
#include "iostream.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
Huf::Huf()
{
numofwords=0;
numofcodes=0;
for(int i=0;i<128;i++)
{
frelist[i]=0;
weight[i]=0;
}
}
Huf::~Huf()
{
}
void Huf::getlist()
{
char temp='a';
while(temp!='0')
{
cin>>temp;
words[numofwords++]=temp;
if(temp!='0')
{
frelist[(int)temp]++;
}//獲取頻率
}
words[numofwords+1]='\0';
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -