Huffman Coding Tree

I am having difficulty implementing a huffman tree using c++
My actual assignment is to take in a filename as an argument then it's supposed to find the frequency of each letter and construct a huffman tree and generate a table of codes to encode. Then its supposed to also be able to decode the encoded file.

I'm extremely confused at this time thank you for any help you can offer.
I'm guessing you already know how to find the frequency of each letter in a string.

How well do you understand huffman trees? If you don't really understand them, then see if this helps at all:

If merely implementing them is your challenge, then maybe this will help:

The implementation is what i'm having trouble with. I pretty much understand what I'm supposed to do but I just dont understand how to actually build the tree in code.
And you expect someone will do it for you?

I fear here are too much tutorials and examples on building any kinds of trees over internet.
Did I say I expected someone to do my entire program for me? No I just need help with the code perhaps a simple basic example would be helpful not bullshit comments like that. Thanks for the link though.
Topic archived. No new replies allowed.