Solved

What's up with Iterators?

Posted on 1998-01-17
2
169 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
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now