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
Goal: Design a program that computes square matrix multiplication on GPU using CUDA. Write the code in C. In particular, your implementation should obey the following requiremen

What are the debugging methods you employ while came across a problem? A: Debugging with tools such as: 1.      DBG, GDB ,Forte, Visual Studio. 2.      Using tusc to trace

I have a Matlab assignment and I have the assignment description+ algorithm + and the output sample. the files are on a dropbox folder and you can download them from the link below

#include stdio.h> #include conio.h> #include string.h>   void main() {           char a[50],b[25][25],l[25],temp1;           int i=0,j=0,k=0,l1[25],c=0,c1=0,t=

what would be the best tool for debuggingg memory leaks in c/c++ programming

C Program for FUNCTION OF DIVIDER int gcd(int , int); void main() {           int m=0,n=0,k=0;           clrscr();           printf("ENTER THE FIRST DIGIT: ");

What are header files? What are their uses? - Header files are also known as library files. - They carry two significant things: definitions and prototypes of functions bein

Is there any difference between List x; and List x ()? Can you please provide me assignment help.

Assume that a Binary Search Tree is constructed by repeatedly inserting exact values in to the tree. Argue that the number of nodes examined in searching for a value in the tree is

Hello I''m new to programming, and I''m making now my 1st program. My question is how to put substr in textbox that question mark should be at the end of sentence? And 2nd question