|
-
March 10th, 2009, 04:48 AM
#3
Re: Choosing the right STL structure
 Originally Posted by cilu
LOL. This can qualify for the joke of the week..
well I'm fighting the C++ corner even though I only picked up the manual 10 days ago.
 Originally Posted by cilu
I never heard of MMAP before. There is not such class in STL. Did you mean std::map? That is something different. The map is a hash table. It's useful for quick access to elements. You don't sort the map. It's automatically sorted. But you can't have multiple values with the same key. If you need that use a std::list and std::sort() to sort it.
Sorry I thought MAP and MMAP were good references (commonly used in typedefs) but pls forgive, I'm a beginner.
Indeed by MAP I meant std::map and by MMAP I meant std::multimap. According to the manual multimap allows duplicate keys while MAP does not.
But if they are presorted by way of a tree all well and good. Just hope I don't get a whopping performance hit.
But are there any other STLs I should consider? From my reading of the manual I don't see any but I'm a bit short of complex examples. Don't want to start and then get C++ kicked into touch because I chose the wrong data structure.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|