What is an iterator class?, C/C++ Programming

A: A class which is used to traverse through the objects maintained through a container class. There are _ve categories of iterators: output iterators, input iterators, forward iterators, bidirectional iterators, random access. An iterator is an entity which gives access to the contents of a container object exclusive of violating encapsulation constraints. Access to the contents is granted onto a one-at- a-time basis in order. The order may be storage order (as in queues and lists) or some arbitrary order (as in array indices) or in according to some ordering relation (as in an ordered binary tree). The iterator is a construct that provides an interface that, while called, yields either the next element in container, or some value mentioning the fact that there are no more elements to verify. Iterators hide the details of access to and update of the elements of a container class. Something as a pointer.

 

Posted Date: 3/21/2013 7:30:01 AM | Location : United States







Related Discussions:- What is an iterator class?, Assignment Help, Ask Question on What is an iterator class?, Get Answer, Expert's Help, What is an iterator class? Discussions

Write discussion on What is an iterator class?
Your posts are moderated
Related Questions
You are required to write a stand-alone DSP application in the C programming language. The overall objective of this application is to convert a signal from the time domain to t


how we use the cin command and why we use this command????

C program to show overloading of matrix operator: Write a program for matrix operator overloading. class matrix{                   private :                 int x[

how much is it to fix a small data struct in a sorted list that pass itemtypes. all the code is written just logical errors

write a prgm to find minimum total number of shelves including the intial one required for loading process

(a) client server or multithreaded client-server, where server will create pool of worker threads (say 5) to provide services to pool of clients (say 5 ).Server should be behaving

I am working on a program that allows a player to play a game against the computer. In this game the player can only chose to draw 1, 2, or 3 toothpicks. How do I make restrictions

array of class objects and single inheritance

I am an online tutor who can teach computer science and programming language. Is there any requirement for this?