Click here to Skip to main content
15,913,610 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to make CStatusBarCtrl::SetBkColor work? Pin
zhong_min3-May-11 18:51
zhong_min3-May-11 18:51 
GeneralRe: How to make CStatusBarCtrl::SetBkColor work? Pin
Hans Dietrich3-May-11 18:57
mentorHans Dietrich3-May-11 18:57 
GeneralRe: How to make CStatusBarCtrl::SetBkColor work? Pin
zhong_min3-May-11 19:23
zhong_min3-May-11 19:23 
QuestionHuffman decoding from using two queues and cursors Pin
Francis Paran3-May-11 5:00
Francis Paran3-May-11 5:00 
AnswerRe: Huffman decoding from using two queues and cursors [modified] Pin
Albert Holguin3-May-11 13:51
professionalAlbert Holguin3-May-11 13:51 
GeneralRe: Huffman decoding from using two queues and cursors Pin
Francis Paran3-May-11 14:11
Francis Paran3-May-11 14:11 
GeneralRe: Huffman decoding from using two queues and cursors Pin
Albert Holguin3-May-11 17:03
professionalAlbert Holguin3-May-11 17:03 
GeneralRe: Huffman decoding from using two queues and cursors Pin
Francis Paran4-May-11 2:07
Francis Paran4-May-11 2:07 
AnswerRe: Huffman decoding from using two queues and cursors Pin
Stefan_Lang3-May-11 20:53
Stefan_Lang3-May-11 20:53 
GeneralRe: Huffman decoding from using two queues and cursors Pin
Francis Paran4-May-11 2:03
Francis Paran4-May-11 2:03 
GeneralRe: Huffman decoding from using two queues and cursors Pin
Stefan_Lang4-May-11 2:07
Stefan_Lang4-May-11 2:07 
GeneralRe: Huffman decoding from using two queues and cursors Pin
Francis Paran4-May-11 2:11
Francis Paran4-May-11 2:11 
GeneralRe: Huffman decoding from using two queues and cursors Pin
Stefan_Lang4-May-11 2:33
Stefan_Lang4-May-11 2:33 
GeneralRe: Huffman decoding from using two queues and cursors Pin
Francis Paran4-May-11 3:58
Francis Paran4-May-11 3:58 
GeneralRe: Huffman decoding from using two queues and cursors Pin
Stefan_Lang4-May-11 5:24
Stefan_Lang4-May-11 5:24 
I suspect that you need to replace
curNode = ithNode->rightCursor;
with
curNode = curNode->rightCursor;
but without knowing your tree structure that is just a guess. And that would still leave you with the problem that the whole file will be considered a single code, and the tree will have to be deep enough that it actually can descend at least as many times as there are '0' characters.

Are there really no separators in that file? Or are your codes supposed to have a fixed length? You need something to decide when the end of the code for the current 'word' is reached.

Or maybe when you reach the end of the tree branching (i. e. curNode->rightCursor==0), does that mean you have reached the end of the code and you have to take the value of the current node instead? I don't know Huffman encoding from the top of my head, but if it's a varied length encoding, this may be it.
GeneralRe: Huffman decoding from using two queues and cursors [modified] Pin
Francis Paran4-May-11 5:47
Francis Paran4-May-11 5:47 
AnswerRe: Huffman decoding from using two queues and cursors Pin
David Crow4-May-11 2:55
David Crow4-May-11 2:55 
GeneralRe: Huffman decoding from using two queues and cursors Pin
Francis Paran4-May-11 3:50
Francis Paran4-May-11 3:50 
QuestionRe: Huffman decoding from using two queues and cursors Pin
David Crow4-May-11 5:38
David Crow4-May-11 5:38 
AnswerRe: Huffman decoding from using two queues and cursors Pin
Francis Paran4-May-11 5:59
Francis Paran4-May-11 5:59 
GeneralRe: Huffman decoding from using two queues and cursors Pin
David Crow4-May-11 7:10
David Crow4-May-11 7:10 
GeneralRe: Huffman decoding from using two queues and cursors Pin
Francis Paran4-May-11 15:29
Francis Paran4-May-11 15:29 
QuestionProcessing CStringW one char at a time Pin
csrss2-May-11 23:10
csrss2-May-11 23:10 
AnswerRe: Processing CStringW one char at a time Pin
csrss2-May-11 23:23
csrss2-May-11 23:23 
GeneralRe: Processing CStringW one char at a time Pin
Niklas L3-May-11 1:08
Niklas L3-May-11 1:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.