哈夫曼编码C++编码
哈夫曼编码、译码。用C++编程 #include
#include
#include
#include
using namespace std; struct HuffmanNode { int parent; int weight; int lchild,rchild; }; class HuffmanTree { public: void CountHuffman(); void CodeHuffman(); void DecodeHuffman(); huffmanTree(); private: struct HuffmanNode *Node; char *data; int leaf; int vv; char a[100]; int q[100][100]; }; HuffmanTree::huffmanTree() { Node=NULL; data=NULL; leaf=NULL; vv=NULL; }
用户评论
太简单了 功能有点少 不过还行