A
Abubakar
Hi,
lets say I have a iterator of the type:
list<string>::const_iterator itr;
lets say its at some position in a given list. Now I can goto the next item
by simply doing a itr++. But I want to increment more than just 1. Lets says
I want to increment the itr 3 times, ie being able to do something like
itr+=3. But as the += is not defined for that iterator class, I cant do
that. What should I do?
Regards,
-ab.
lets say I have a iterator of the type:
list<string>::const_iterator itr;
lets say its at some position in a given list. Now I can goto the next item
by simply doing a itr++. But I want to increment more than just 1. Lets says
I want to increment the itr 3 times, ie being able to do something like
itr+=3. But as the += is not defined for that iterator class, I cant do
that. What should I do?
Regards,
-ab.