{
Char m;
HuffmanTree HT.
The menu ();
Int p=2 * n - 1;
While (m!
=5){
{
Cin> m;
If (m=='1')
{
System (" CLS ");
ReadData ();//read from the file data,
Cout<" Read data succeed!"
Else if (m=='2')
{
System (" CLS ");
CreateHuffmanTree (HT, a, b);//build the Huffman tree,
Cout<" Build the Huffman tree successful!"
Else if (m=='4')
{
System (" CLS ");
CreatHuffmanCode (HT);//to encode the Huffman tree,
Cout<" Huffman encoding success! Can open OutMa. TXT view, "& lt;
Else if (m=='5')
{
System (" CLS ");
InCode (HT);//to decode input code,
Cout<" Decoding the results at the same time deposit Translate. TXT file, can open the view "& lt;
Else if (m=='3')
{
System (" CLS ");
int i=0;
While (i>=0)//find the root node
{
If (HT [I]. Parent==1)
break;
The else
{
i++;
continue;
}
}
Cout<" Displays the Huffman tree: "sunken into laws & lt;
PrintHF1 (HT, I, ss);
Cout<" Parentheses method shows the Huffman tree: "& lt;
Cout
The else
break;
}
}
return 0;
}