STL Thesaurus :(
ATL / WTL / STL
2
Posts
2
Posters
2
Views
1
Watching
-
I`m writing my own thesaurus, and I have some problem: How to find a word (CString) in multimap and get index (int) of this word? Can somebody tell me where I can find some examples of thesauruses in VC++ :) Hegemon
You can find the word by using the multimap container's
find
method. As for the index to the word, what do you mean by that? There are no indexes in maps, per-say; however, you can get an iterator that references the matched pair (Which I gather is a CString-to-int), but not an integer (unless you mean the int that is paired with the CString in which case you would just dereference the iterator returned byfind
and access thesecond
data members). cheers, -B