Stl map problems, gcc 3.0, libstdc++ 3
Benjamin Kosnik
bkoz@redhat.com
Mon Jul 23 15:07:00 GMT 2001
> I think that may have been the solution to that problem. Doing the same
> thing without a positional insert seems to have solved the random
> behavior of count and find. Maybe this was because the map
> was empty when I was inserting, though this shouldn't make a difference.
> I also am no longer using the key comparision object in the map
> declaration (no more less<string>, I really didn't need it for this map
> anyway). I'm not sure if just the removal of the positional insert or
> the removal of using less did it (or both) , but it seems to work now.
Great.
For future reference, it's a lot easier for people to help you if you post
full code to what your are trying to do, with annotated comments. Things like
"..."
indicate "magic step" to me and are a bit vague. If I can
copy/paste/compile, it's much easier for me to help you.
-benjamin
More information about the Libstdc++
mailing list