On Tue, 2004-02-24 at 15:57, Juan Carlos wrote: Hi
> Im beginning with stl list containers. So far Ive always been using > the MFC collections but now I need to port an app to Linux so I > thought stl collections are a better alternative.. Ah! You've seen the light! > Anyway, I believe this should be a trivial question, in particular, > about the correct use of the stl::list collection and iterators. Ok... > My question is: should I use now an iterator (as a data member in > CMyClass) to keep track of the current item in the list? I know that > iterators are invalidated with some operations such as erase(). Is > there a better approach? I depends how you are using the objects in your container. Can we have some more info? If I were you I'd do myself a huge favour and buy a copy of the C++ Standard Template Library by Nico Josuttis: <http://www.amazon.co.uk/exec/obidos/ASIN/0201379260/ref=sr_aps_books_1_1/026-6025342-3546002> Failing that, if you let me have some more info I'll knock you up a simple solution tomorrow. -- Regards Paul Paul Grenyer Email: [EMAIL PROTECTED] Web: http://www.paulgrenyer.co.uk Have you met Aeryn: http://www.paulgrenyer.co.uk/aeryn/? Version 0.3.0 beta now ready for download
