L
lakepeir
Hello,
I'm having problems with the find function of the STL map structure.
Whenever I call the find method with an ID, the else is executed as if
the value exist in the map. The ID does not exist in the map because I
haven't added it.
Here's the Code:
std::map<CComVariant, CComPtr<Interface> > mymap;
DWORD ID;
if( mymap.find(ID) == mymap.end() )
{
//do something
}
else
{
//do something
}
Any help is appreciated. Thanks.
I'm having problems with the find function of the STL map structure.
Whenever I call the find method with an ID, the else is executed as if
the value exist in the map. The ID does not exist in the map because I
haven't added it.
Here's the Code:
std::map<CComVariant, CComPtr<Interface> > mymap;
DWORD ID;
if( mymap.find(ID) == mymap.end() )
{
//do something
}
else
{
//do something
}
Any help is appreciated. Thanks.