I want to use std::map , whose key elements and values ββare structures.
I get the following error: error C2784: 'bool std::operator <(const std::basic_string<_Elem,_Traits,_Alloc> &,const _Elem *)' : could not deduce template argument for 'const std::basic_string<_Elem,_Traits,_Alloc> &' from 'const GUID
I understand that in this case I have to overload operator < , but the fact is that I do not have access to the code of the structure that I want to use ( GUID structure in VC ++).
Here's the code snippet:
//.h #include <map> using namespace std; map<GUID,GUID> mapGUID; //.cpp GUID tempObj1, tempObj2; mapGUID.insert( pair<GUID,GUID>(tempObj1, tempObj2) );
How to solve this problem?
c ++ stl visual-studio-2005 stdmap
dragan.stepanovic
source share