I want to maintain a plenty of elements in a container and maintain another table record the relationships of every two elements in the container. new elements can be added into the container. The table should be access randomly. I tried keeping the elements in a list, and use map<list<...>::iterator,map<list<...>::ierator,int> >. but I found list<...>::iterator doesnt have an operator<() implemented.
Actually, I am asking for an implement of graph
Is there any proper container in STL or boost can handle the trick. Thx!