Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
STL question: is this O/T ?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Dave Townsend, post: 1491589"] Michael The reason your code crashes is you have an invalid index in: void HuffmanNode::AddSubTreeToVector( vector<string>& v, string currentString) { assert(this); if(Represented != -1) v[Represented] = currentString; The value of Represented is some negative number. This is because the type of represented souldbe unsigned char, not char, so you can stuff a 0..255 value in that. dave [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
STL question: is this O/T ?
Top