?
Solved

What's up with Iterators?

Posted on 1998-01-17
2
Medium Priority
?
176 Views
Last Modified: 2013-12-14
I was thrilled to see the support for containers (i.e. vector, list, etc) in C++, but the concept of iterators eludes me.  I see they are all over these containers and since I don't really know how to use them, I'm having trouble implementing the containers.
I was thrying to implement a vector full of structs (or classes perhaps).  How would I go about doing this, and then how to iterators play a part in operating on this vector?  How does one obtain an iterator?  Any insight would be much appreciated!
0
Comment
Question by:Timbo011598
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 20 total points
ID: 1178431
The whole subject of iterators is probably beyond explaining in detail here, but I can give you some good reference materials to lookup:

Dr. Dobbs Journal, June 1996, Dan Zigmond on STL Iterators
Windows Developer Journal, March 1997, Using STL with MFC
Title       STL Tutorial and Reference
            Guide; C++ Programming
            With the Standard Template
            Library
Authors:    David R. Musser and Atul
            Saini
Publisher:  Addison-Wesley Publishing
            Company, Inc., 1996.
Pages:      400, hardcover
Price:      $35.95
ISBN:       0-201-63398-1

0
 
LVL 5

Expert Comment

by:yonat
ID: 1178432
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question