|
-
December 23rd, 2002, 05:38 AM
#1
Need C++ STL::LIST Container Help...
I'm declaring the following variables:
std::list<int> myVar;
std::list<int>::iterator iter1;
I'm in a situation where to have a list container work best for me I need to store the address to specific elements within the list rather than have to iterate through the list from top to bottom.
Is it possible for me to store the address of specific elements within the list for later direct access and iteration (forwards, backwards) from that point? I would like to store the obtained address as a CHAR * if possible, but not required. Or if this is impossible what would be my best option for getting to list items quickly?
I'm declaring the following variables:
std::list<int> myVar;
std::list<int>::iterator iter1;
I'm in a situation where to have a list container work best for me I need to store the address to specific elements within the list rather than have to iterate through the list from top to bottom.
Is it possible for me to store the address of specific elements within the list for later direct access and iteration (forwards, backwards) from that point? I would like to store the obtained address as a CHAR * if possible, but not required. Or if this is impossible what would be my best option for getting to list items quickly?
I've created a combobox with a number of items within it. Ideally I would like each combo item to know exactly which list container element it is directly related to so that on selection I can directly jump to and iterate from that location.
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
|