From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ivan Martinez To: gcc-help@gcc.gnu.org Subject: STL - How to use of iterators? Date: Mon, 14 Feb 2000 08:57:00 -0000 Message-id: <38A83445.BE5A2E38@kalman.iau.dtu.dk> X-SW-Source: 2000-02/msg00046.html Hello! I have readed some docs and tried some things with my compiler but I don't get to understand the use of iterators very well. Suppose I have a class A. class A { public: ... int number; } Then I create a list with some instances. main (int argc, char *argv []) { list l; A a; l.push_back (a); l.push_back (a); l.push_back (a); ... Could somebody give me examples of accesing (reading and writing) the member "number" of the elements of "l" sequently and randomly?. Thanks in advance. -- Ivan Martinez (Rodriguez) Bch in Computer Science - MSc student http://www.student.dtu.dk/~u990873 "Ponia Windows98 o superior, asi que instale Linux" From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ivan Martinez To: gcc-help@gcc.gnu.org Subject: STL - How to use of iterators? Date: Sat, 01 Apr 2000 00:00:00 -0000 Message-ID: <38A83445.BE5A2E38@kalman.iau.dtu.dk> X-SW-Source: 2000-q1/msg00240.html Message-ID: <20000401000000.8ccihSawCi-ODAelwFcmdazI3G1Mj-JH2CUi-7WelZI@z> Hello! I have readed some docs and tried some things with my compiler but I don't get to understand the use of iterators very well. Suppose I have a class A. class A { public: ... int number; } Then I create a list with some instances. main (int argc, char *argv []) { list l; A a; l.push_back (a); l.push_back (a); l.push_back (a); ... Could somebody give me examples of accesing (reading and writing) the member "number" of the elements of "l" sequently and randomly?. Thanks in advance. -- Ivan Martinez (Rodriguez) Bch in Computer Science - MSc student http://www.student.dtu.dk/~u990873 "Ponia Windows98 o superior, asi que instale Linux"