<unresolved overloaded funciton type>中文意思是:<未解析的重载函数类型>
我放一部分我的报错代码:
bool cmp(const Edge<TV, TE> &a, const Edge<TV, TE> &b) {
return(a.weight < b.weight);
}
std::sort(edgeArr, edgeArr + edgeNum, cmp);
而且,上面那些都是在一个类里(注意:这里是报错的重点)
template<class TV, class TE> class AdjListGraph {...}
编译后就会有这样的报错:
[Error] no matching function for call to 'sort(Edge<int, int>*&,
Edge<int, int>*, <unresolved overloaded function type>)'
void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter =
Edge<int, int>*; _Compare = bool (AdjListGraph<int, int>::*)
(const Edge<int, int>&, const Edge<int, int>&)]
no known c