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

The Best fit algorithm: The best fit method occurs the smallest free block whose size is greater than or equivalent to n. An algorithm to get such a block by traversing the whole

#C Why don''t online compilers support the header file? What can I do to resolve this? PS. I have tried , does''nt work either. Thannk in advance.

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Your program will read two kinds of data from two files: names and predicates. It will read a formal expression from standard input and check whether that expression is syntactical

i am a engineering student and am working on a project in audio processing and so i have designed a FIR filter in Matlab . how can i get my Matlab program converted to C program?

Q: When should you employ multiple inheritance? A:There  are  three  acceptable  answers:-  "Rarely," "Never," and  "while  the  problem  domain cannot be modeled accurately any

For the circuit shown in Figure, verify (a) the battery voltage V , (b) the total resistance of the circuit, and (c) the values of resistance of resistors R 1 , R 2 and

Write a program that finds the minimum total number of shelv, C/C++ Programming

Write a program that finds the minimum total number of shelves, including the initial one required for this loading process.