Thank you very much mr. Ancient Dragon. Your code looks very nice and reusable. Will use these ideas in my solution.
[edit]
Anyway I'll think about it some more, inserting elements shouldn't invalidate iterator.
Last edited by Cybulski; May 14th, 2008 at 9:48 am.