|
-
June 1st, 2006, 05:35 AM
#1
STL - std::map question...
Hi.
I declare this kind of map:
typedef std::map<const char*, ISingleWord*> DataStructure;
DataStructure m_dsSharedWords;
and when I use the 'find()' method it doesn't return good answers, I understand it's because I need to implement some kind of function that is like 'Comparator' in java (implemets 'less <') something like that...
the declaration should be (I think):
typedef std::map<const char*, ISingleWord*, Comparator> DataStructure;
and then I need to implement 'Comparator' ...is that the way ??
If someone can show me some piece of code...it would be appreciated.
Thanks.
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
|