Hmm ... it's part of a bigger project so that it's not so easy to cut it out.
But maybe it helps if I'd share my GSHashmap DLL with you, so that it might be easy to try yourself.
You can download it here:
GSHashmap It's not final, but works fine in my tests so far.
All you have to do is create objects dynamically in a loop and add their pointers to the GSHashmap under a certain key.
(use char* as key).
Then try to get one of them (not the last one) back from the hashmap and look if it's the right one.
If I do something like this:
ENTITY* ent1 = ent_create(...);
ENTITY* ent2 = ent_create(...);
addToGSHashmap("entity1", ent1);
addToGSHashmap("entity2", ent2);
ENTITY* ent3 = (ENTITY*)getFromGSHashmap("ent1");
Everything worked fine ... but it does not if I do it dynamically in a loop.
Regards,
Pegamode.