I'm trying to sort a list (part of a class) in descending order containing items of a struct, but it doesn't compile:
error: no match for 'operator-' in '__last - __first'
sort(Result.poly.begin(), Result.poly.end(), SortDescending());
And here's SortDescending:
struct SortDescending
{
bool operator()(const term& t1, const term& t2)
{
return t2.pow
Can anyone tell me what's wrong?
Your Answer
0 answers
Hot tools Tags
Hot Questions
What's the difference between size_t and int in C++? [duplicate]
2025-12-30 15:43:32
Oracle: Combine multiple results in a subquery into a single comma-separated value [duplicate]
2025-12-30 15:22:08
Oracle Update Query using Join
2025-12-30 15:01:13
How to create an std::function from a move-capturing lambda expression?
2025-12-30 14:43:12
What's the difference between eval, exec, and compile?
2025-12-30 14:22:20
Popular tool
vc9-vc14 (32+64 bit) runtime library collection (link below)
Download the collection of runtime libraries required for phpStudy installation
VC9 32-bit
VC9 32-bit phpstudy integrated installation environment runtime library
PHP programmer toolbox full version
Programmer Toolbox v1.0 PHP Integrated Environment
VC11 32-bit
VC11 32-bit phpstudy integrated installation environment runtime library
SublimeText3 Chinese version
Chinese version, very easy to use
Hot Topics
Douyin level price list 1-75
20416
7
20416
7
wifi shows no ip assigned
13574
4
13574
4






