Raj Guest
|
Posted: Tue Apr 03, 2007 2:50 pm Post subject: STL-C++ - combining lists with maps |
|
|
Using STL- C++, i declared a list and a map so that i have a
datastructure - map of lists ie every index of the map will point to a
list as shown below
1 -> 1,2,3,4,5,6,7,8,9
2 -> 1,2,3,4,5,6
3 -> 1,2,3
4 -> 1,2,3,4,5,6,7,8,9
5 -> 1,2,3,4,5
typedef list<TObject*> TList;
map<int,TList> TMap;
Con somebody please tell me, how i can acquire (push_back) new objects
in to the list?
something like " TMap[index].TList.Push_Back(TObject) "; <-- This
statement is not correct.
Thanks
Raj |
|