A
Abubakar
Hi all,
I'm using stl's list to store some file names. Its declared as:
list < char * > filenames;
i enumerate the list by using:
list < char * >::const_iterator filename;
filename = filenames.begin();
than I simply do a filename++ to go to the next item.....
I check for filenames.end() in an *if* condition somewhere in my code to
check if I'm dealing with the last item of the list. The code to do this was
working fine. But now due to some change in my code, some of the list items
are deleted *before* the filenames.end() check. I have noticed that this
check now never evaluates to true although I know in the debugger that I'm
standing at the last item. I'm sure I'm missing some basic concept here. How
can I check now that this is the last item of the list?
I'm using vc++ 2k5 total unmanaged.
Regards,
-ab.
I'm using stl's list to store some file names. Its declared as:
list < char * > filenames;
i enumerate the list by using:
list < char * >::const_iterator filename;
filename = filenames.begin();
than I simply do a filename++ to go to the next item.....
I check for filenames.end() in an *if* condition somewhere in my code to
check if I'm dealing with the last item of the list. The code to do this was
working fine. But now due to some change in my code, some of the list items
are deleted *before* the filenames.end() check. I have noticed that this
check now never evaluates to true although I know in the debugger that I'm
standing at the last item. I'm sure I'm missing some basic concept here. How
can I check now that this is the last item of the list?
I'm using vc++ 2k5 total unmanaged.
Regards,
-ab.