Use typedef in C++ huffman tree building program