hi,
I've completed huffman coding..but there is one small issue...in my decoded file the character "ÿ" keeps appearing at random places...I checked the problem and a second parse of the input file gives some characters that are not in my tree which ends up adding a code 0 of length 0 ...i dunno what that is...
AutoC
0
Junior Poster in Training
Recommended Answers
Jump to PostWith out seeing the code, it's a wild guess for us to.
But I bet that you break out of an array's bounds somewhere
Jump to PostHow are you reading the files?
Because "ÿ" is char 255, which is the same (typically) as (char)EOFThat is, you reached the end of the file, but did not detect EOF properly, but instead cast it to a char.
All 6 Replies
Nick Evan
4,005
Industrious Poster
Team Colleague
Featured Poster
AutoC
0
Junior Poster in Training
Salem
5,138
Posting Sage
AutoC
0
Junior Poster in Training
Salem
5,138
Posting Sage
AutoC
0
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.