STL的一个基础问题,请高手赐教。
std::map<GUID,FILE_TRANSFER_TASK*> FileMap2;
typedef std::map<GUID,FILE_TRANSFER_TASK*>::value_type FileTransferValType2;
//////
GUID testGuid;
CoCreateGuid(&testGuid);
FileMap2.insert(FileTransferValType2(testGuid,NULL));
编译时提示:
[C++ Error] function.h(169): E2093 'operator<' not implemented in type '_GUID' for arguments of the same type
原因应该就是GUID不能象int,long等这些原始数据类型可以比较大小。但是我现在又想使用GUID,因为GUID是全球唯一的,它肯定能唯一识别一个map entry,那应该怎么做呢?