Tools.h++ Class Reference

Table Of Contents
For both operator++ and operator(), iterating past the last element will return a value equivalent
to boolean false. Continued increments will return a value equivalent to false until reset() is
called.
Persistence
None
xamples
#include<rw/tvmap.h>
#include<iostream.h>
#include<rw/cstring.h>
int main(){
RWTValMap<RWCString,int,greater<RWCString> > age;
RWTValMapIterator<RWCString,int,greater<RWCString> > itr(age);
age.insert("John", 30);
age.insert("Steve",17);
age.insert("Mark",24);
//Insertion is rejected, no duplicates allowed
age.insert("Steve",24);
for(;itr();)
cout << itr.key() << "\'s age is " << itr.value() << endl;
return 0;
}
Program Output
Steve's age is 17
Mark's age is 24
John's age is 30
Public Constructors
RWTValMapIterator<K,T,C>
(RWTValMap<K,T,C>&h);
Creates an iterator for the map h. The iterator begins in an undefined state and must be
advanced before the first association will be accessible.