代码为:
struct compHCodeID
{
public:
bool operator()(DataStruct& _X,DataStruct& _Y)
{
return _X.strCodeID<_Y.strCodeID;
}
};
std::list m_sortDataList; //历史排序链表
m_sortDataList.sort(compHCodeID().operator());
报错为:error C2664: 'void __thiscall std::list<struct std::tagDATASTRUCT,class std::allocator<struct std::tagDATASTRUCT> >::sort(struct std::greater<struct std::tagDATASTRUCT>)' : cannot convert paramete
r 1 from 'bool (struct std::tagDATASTRUCT &,struct std::tagDATASTRUCT &)' to 'struct std::greater'