BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

STL-C++ - combining lists with maps

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Students)
View previous topic :: View next topic  
Author Message
Raj
Guest





PostPosted: Tue Apr 03, 2007 2:50 pm    Post subject: STL-C++ - combining lists with maps Reply with quote



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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Students) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.