-
Thanks for the replies, Yeah its all fixed. The AnimFile* wasnt really necessary as value worked just fine. That and the use of the string class solved problems.
ohh and yes just irtating through the map deleting all dynamic memory then callng clear() worked.
-
@ AH_Tze:
Indeed, that's what I meant (although perhaps I wasn't clear). List and vector (probably deque too) all have mechanisms by which you can erase an element and continue looping; with map, as far as I can tell, if you erase an element then there is no way to get an iterator for the next element and therefore you must start over from the beginning again. In this case, it seems that would be a simple thing to do - since every element is deleted, the 'next' element is always the first element, so begin() should suffice to provide you with suitable iterators.
Come to think about it, my post has less and less meaning every time I read through it :D