Original Post
I recently found how useful templates are. But here''s my problem with list:
list listFrames;
// then I add some pointers to list
listFrames.push_back( pNewFrame1 );
listFrames.push_back( pNewFrame2 );
...
Then I need to redner frames so I have to get all the frames from the list. I can get first and last easily popping them.
This is what I normally do
Cframe *f = pFirstFrame;
while(f)
{
// do something here
f = f->next;
}
I use list instead of vector since I need to be able to remove items anywhere. using vector it could be done this way vecFrames[0] but not for list.
How can I acces any item in a list?