|
-
October 8th, 2003, 09:31 AM
#1
looping on std:list
can someone please give me an example of a loop going over items at std:list
thanks
-
October 8th, 2003, 10:56 AM
#2
Code:
list<T>::iterator it;
for (it=my_list.begin(); it!=my_list.end(); ++it)
{
// *it has the value ofn the list element
}
-
October 8th, 2003, 11:11 AM
#3
thanks Philip
I'll try to post in my new threads more "real" code
another question:
how can I retrive the data from the current list item, without removing it (meaning not using pop_front)
I mean what can I do with mt iterator (it)
Last edited by avi123; October 8th, 2003 at 11:39 AM.
-
October 8th, 2003, 12:40 PM
#4
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|