Update hoffmanencoding.cpp

Fixed the first (unsorted) char frequency array to work correctly with read files and added cout's for easy checking. I isolated this section and tested it alone and it works perfectly.