From: Ivan Martinez <ex08@kalman.iau.dtu.dk>
To: gcc-help@gcc.gnu.org
Subject: STL - How to use of iterators?
Date: Sat, 01 Apr 2000 00:00:00 -0000 [thread overview]
Message-ID: <38A83445.BE5A2E38@kalman.iau.dtu.dk> (raw)
Message-ID: <20000401000000.8ccihSawCi-ODAelwFcmdazI3G1Mj-JH2CUi-7WelZI@z> (raw)
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<A> 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"
next reply other threads:[~2000-04-01 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-02-14 8:57 Ivan Martinez [this message]
2000-04-01 0:00 ` Ivan Martinez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=38A83445.BE5A2E38@kalman.iau.dtu.dk \
--to=ex08@kalman.iau.dtu.dk \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).