C++ implements the establishment of the Huffman tree