Coded Huffman coding in C++