Huffman tree assignment written in C++