The forward iteration is easy enough:
for (list<string>::iterator itr = mylist.begin(); itr != mylist.end();
itr++)
I naively tried to reverse it like this:
for (list<string>::iterator itr = mylist.end(); itr != mylist.begin();
itr--)
But then I realized that the issue is not that simple, as you are not
supposed to find anything usable at the list.end().
Should I try to reverse:
- The iterator?
- The list itself?
TIA,
-Ramon
for (list<string>::reverse_iterator itr = mylist.rbegin(); itr !=
mylist.rend(); itr++) ?
Helge
"Ramon F Herrera" <ra...@conexus.net> wrote in message
news:6a123b5f-20e9-4e70...@a21g2000yqc.googlegroups.com...
Ah! That is the solution - I have seen those r-members around...
Thanks!
-Ramon