Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 2
    Besides theState you have properly initialized every member of your class. Hence not initializing theState could be the source of the problem. Commented Oct 1, 2010 at 6:39
  • 1
    If state has a default constructor, it's automatically called, so no need to explicitly call it. However, if there's no default constructor, that's another story. Commented Oct 1, 2010 at 7:05
  • 1
    how I might get uninitialized data (besides the theState)... By this which data you mean is uninitialized? Besides theState, other data shown in the class seems to be initialized properly... Commented Oct 1, 2010 at 7:11
  • Thanks for the pointers. It ends up I was accidentally passing a reference to an object in the hash_map. When the hash_map was automatically resized, my data got scrambled. Commented Oct 1, 2010 at 18:46