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
Pawnbroker software to be written in VB Project Description: I want software written for my pawnshop. I am currently using a program called pawnboss but would like to have my

Use the program called harris-shell.c and add some code to find the corners in the image checkers.jpg. You should say that a pixel in the image is a corner if it passes the given t

Define Storage Classes of c program - computer programming? Each variable and function in C language has two attributes that are type and storage class. If storage class of a v

Problem Description Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new techn

What is the real function of class - to export data? No, Real purpose of a class isn't to export data. Instead, it's to provide services. Class provides a way to abstract behav

Create Complex number using constructor: class complex                                 {                                                   private:

Objects as Function Arguments: In C program there are several methods to define arguments, and in some case even a structure can be approved as an argument.  Similarly in C+

Create a .cpp program that verifies the strength of a password that a user is entering is strong (complex/secure) enough. In the main area of the program, prompt the user to enter

Implement, in rPeANUt, the a Fibonacci function by using the simple recursive approach. The Fibonacci function can be implemented in c as follow: int fib(int x) {   if (x

Ask quIn the Byteland country a string "s" is said to super ascii string if and only if count of each charecter in the string is equal to its ascci value in the byteland country as