Hello, i'm newbie with hash_map function and i need some help.
I'm trying to create a hash_map with VC7 where both key and data must be my own classes
I mean, i need a hash_map such as
hash_map<CSegment,CListofSegments,hash<CSegment>,Close> hasht;
In where the key is a segment, the data is a list of segments which are close to the segment 'key'. To acces to this entry of the hash table, i don't need to index by the segment 'key' itself but by any segment close to it.
What must I do with hash<CSegment>??
I understand that i have to define a way to define a hash-function to index the map...
But I'm really lost and don't know where or how to do it....
Thank you!
I'm trying to create a hash_map with VC7 where both key and data must be my own classes
I mean, i need a hash_map such as
hash_map<CSegment,CListofSegments,hash<CSegment>,Close> hasht;
In where the key is a segment, the data is a list of segments which are close to the segment 'key'. To acces to this entry of the hash table, i don't need to index by the segment 'key' itself but by any segment close to it.
What must I do with hash<CSegment>??
I understand that i have to define a way to define a hash-function to index the map...
But I'm really lost and don't know where or how to do it....
Thank you!
Last edited: