[Solved] Sorting vector of arrays by array’s element

[ad_1]

I don’t know where you got data from, but you need to change it to array<int, 3> or make compareByValue a template:

bool compareByValue(const array<int, 3> &a, const array<int, 3>&b)
{
    return a[0] < b[0];
}

2

[ad_2]

solved Sorting vector of arrays by array’s element