|
-
April 28th, 2004, 07:30 PM
#1
stl list & iterators
I've got a list for XML objects. i'm using the std::list
i declare an iteraror, and set it to the beginning of the list
Code:
XML::iterator i = this->begin();
then i want to go to the 'num' positon of the list, so i use this for bucle:
Code:
for(int ii=0; ii<num ;i++, ii++);
that code is ok, i can see what's on the list.
The problem is that i don't know how to delete that position. the following code doesn't seem to work...
do you have any ideas? this is my first project with stl.. i've read Eckels Thinking In C++ vol 2 and i can't find anything.. he speaks about a remove method, but i can't use it
thanks!!
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
|