I use a map in my code <BSTR,struct>
bstr being the key and struct the value.
Will this work or do I have to redefine something?
I see no compile issues and I'm able to add elements too. However, map.find()
does not work. Even though the element is present, it always returns map.end()
(element not found).
I did a temporary workaround as follows - by looping from map.begin()
to map.end()
and doing a lstrcmpW for each element. This seems to work, but dont think this is too efficient.
Any suggestions/tips on what could be wrong? Is it ok to use BSTR
as key for a map? I know maps do not support some of the non-native data types - structs or classes...u need to define a <
operator for that.