STL <list>

Apr 9, 2009 at 12:25pm
My work is using STL <list> to implement a "linked list of linked list. For example a linked list of messages. Each message class will contain a linked list of packet. So how can i make doubly linked list in STL and do i need to create a class for packet which contain sequence number and text.
Apr 9, 2009 at 12:32pm
the STL list is a doubling linked list, but as you said you want a list of a list. I've seen it done with vectors, so I assume there's nothing stopping you from making:
list<list<DataType> > myList;
Apr 10, 2009 at 10:46am
Thx for help. But how to all element of linked list in side another one ? I means when i call linked list message, it will also call message's linked list such as packet linked list.

Ex : Start -> Message1 -> Message2 ...

Message1 -> Packet1 -> Packet2 ...
Apr 10, 2009 at 3:23pm
It is more like this:

or this way
Start->m1->m2->m3->...
| | Can go this way
V V
p1 p1
Apr 11, 2009 at 11:42am
so how can i create a packet list for each message ?
Apr 11, 2009 at 10:28pm
and one more thing, how to know which packet list for which message ?
Apr 16, 2009 at 11:57am
sounds like something that is due on the 24/04/2009...
Topic archived. No new replies allowed.