Expl01T3R
Active member
finally someone who understands cpp and its syntax !C++:HuffmanEncodingTreeNode* currentNode; HuffmanEncodingTreeNode* root; unsigned outputWriteIndex; outputWriteIndex = 0; currentNode = root; ... if (input->ReadBit() == false) // left! currentNode = currentNode->left; // access violation else currentNode = currentNode->right; // same ↑
You assign an unitialized pointer(root) to another unitialized pointer(currentNode), then you try to dereferencing it, it's bound to crash. It looks like you miss some important initialization code.