C++ Array of Linear Linked Lists (using different pointers?)

Hello - I am wondering if its possible to create an array of linear linked lists, with each list being of a different node type?

This is for an assignment asking us to implement a sort of container object, that has three different lists of things in it, using an array of LLLs as the data structure. However, we have not gotten into dynamic binding or templates yet, so the only way I can see to have the nodes point to different class objs/data-types is three different node classes... which would require the array to have 3 different node pointers.

visualization example:
1
2
3
4
|                   [ptr1] | ---> nodeclassA ---> objecttype1
| CONTAINER         [ptr2] | ---> nodeclassB ---> objecttype2
|                   [ptr3] | ---> nodeclassC ---> objecttype3
+--------------------------+



Anyone have any suggestions? Or know if what I'm asking is even possible?
Last edited on
Are you allowed a tuple of lists?
They haven't said no... so maybe?
Topic archived. No new replies allowed.