* Re: AW: STL - How to use iterators? [not found] <28D6CEAEAB8BD211ADD300A0C9D5B739FB2B5D@r4667.erlf.siemens.de> @ 2000-02-15 2:36 ` Ivan Martinez 2000-04-01 0:00 ` Ivan Martinez 0 siblings, 1 reply; 2+ messages in thread From: Ivan Martinez @ 2000-02-15 2:36 UTC (permalink / raw) To: gcc-help [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 1022 bytes --] May Adrian wrote: > class A > { >Â Â Â Â public: >Â Â Â Â Â Â Â Â ... >Â Â Â Â Â Â Â Â int number; Â Â Â Â Â Â Â Â Â Â Â Â A(int n):number(n){} > } > > > main (int argc, char *argv []) { >Â Â Â Â list<A> l; >Â Â Â Â A a1(10), a2(20), a3(30); >Â Â Â Â l.push_back (a1); >Â Â Â Â l.push_back (a2); >Â Â Â Â l.push_back (a3); > Â Â Â Â Â Â //notice !=, not < ... Â Â Â Â Â Â for (list<A>::iterator i = l.begin();i != l.end() ; i++) Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â cout << (*i).number << endl; Â Â Â Â Â Â Â } On the one hand "i" is a "list<A>::iterator". Ont the other docs tell about "iterator_traits", "input_iterator_tag", "bidirectional_iterator"... What type is "iterator"? --Â Ivan Martinez (Rodriguez) Bch in Computer Science - MSc student http://www.student.dtu.dk/~u990873 "Ponia Windows98 o superior, asi que instale Linux" Â ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: AW: STL - How to use iterators? 2000-02-15 2:36 ` AW: STL - How to use iterators? Ivan Martinez @ 2000-04-01 0:00 ` Ivan Martinez 0 siblings, 0 replies; 2+ messages in thread From: Ivan Martinez @ 2000-04-01 0:00 UTC (permalink / raw) To: gcc-help [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 1022 bytes --] May Adrian wrote: > class A > { >Â Â Â Â public: >Â Â Â Â Â Â Â Â ... >Â Â Â Â Â Â Â Â int number; Â Â Â Â Â Â Â Â Â Â Â Â A(int n):number(n){} > } > > > main (int argc, char *argv []) { >Â Â Â Â list<A> l; >Â Â Â Â A a1(10), a2(20), a3(30); >Â Â Â Â l.push_back (a1); >Â Â Â Â l.push_back (a2); >Â Â Â Â l.push_back (a3); > Â Â Â Â Â Â //notice !=, not < ... Â Â Â Â Â Â for (list<A>::iterator i = l.begin();i != l.end() ; i++) Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â cout << (*i).number << endl; Â Â Â Â Â Â Â } On the one hand "i" is a "list<A>::iterator". Ont the other docs tell about "iterator_traits", "input_iterator_tag", "bidirectional_iterator"... What type is "iterator"? --Â Ivan Martinez (Rodriguez) Bch in Computer Science - MSc student http://www.student.dtu.dk/~u990873 "Ponia Windows98 o superior, asi que instale Linux" Â ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-04-01 0:00 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <28D6CEAEAB8BD211ADD300A0C9D5B739FB2B5D@r4667.erlf.siemens.de> 2000-02-15 2:36 ` AW: STL - How to use iterators? Ivan Martinez 2000-04-01 0:00 ` Ivan Martinez
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).