CompareIntegerMaps
CompareIntegerMaps copied to clipboard
Insert() bug
Unless I'm overlooking something there appears to be a bug in your HashTable::Insert() method.
First you search for the Cell with matching key or an empty cell with key == 0. Then if key == 0 you do a resize check before doing the insertion.
The problem is once you resize the array, the cell pointer you had before now points to garbage. After resizing you need to redo the lookup.
And he does, look at the break just after the resize.