linutza_aldys wrote:
> --- In [email protected], Vic Wagner <[EMAIL PROTECTED]> wrote:
>   
>> linutza_aldys wrote:
>>     
>>> hello!
>>>
>>> i'm trying to sort a list of objects using hash_multiset. i was 
>>> wondering if anybody worked with hash_multiset and if they had 
>>>       
> any 
>   
>>> problems sorting more complex objects.
>>>   
>>>       
>> by it's nature, hash_multiset (not part of the C++ standard) is 
>> unordered, and you cannot muck with the order.
>> IF you need it ordered, use std::multiset.
>>
>> why are you using hash_multiset anyhow?  Are you SURE your lookups 
>> exceed your insertions by enough to warrant its use?
>>     
>>> thank you!
>>>
>>>       
>
> i'm not really interested in easy access... all i need is the 
> elements to be in correct order.
> i also tried using multiset, but without success.
>   
std::multiset<yourtype> theset;
> do you know if, in std, it is possible to have a multiset of class X 
> objects in class X?... or any ideas about how to make a sorting 
> function?
>   
have an object contain itself? perhaps you should tell us what exactly 
it is you think you want to do.
or do you want an object to contain a collection of it's own types?    
Containers and elements are two distinct types I'm not clear on what 
you're wanting to do.
> thank you very much!
>   

Reply via email to