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
Define The Return Statement in Computer Programming? The return statement is used for two purposes once the return statement is executed the program control will be immediately

#padovan string   program in java // aakash , suraj , prem sasi kumar kamaraj college program 1 : package test.padovanstring; public class PadovanString {


Pebble Merchant Problem Description There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides

#questio c++ program for drawing thick line


Aim: To implement a program to display a rectangle, circle and triangle. Code:                       class shape {             public:                         vir

define a class for student

what is classes?

A: Using the extern "C" linkage specification around the C function declarations. Programmers must know about mangled function names and type-safe linkages. After that they must