Home » Community » Newbie corner » Sorting a ValueArray ?
Sorting a ValueArray ? [message #42911] |
Mon, 14 April 2014 11:49  |
mingodad
Messages: 53 Registered: February 2008 Location: Spain
|
Member |
|
|
Hello !
How to sort a ValueArray ? Trying to use Sort() gives this error:
static bool CompareGetDistances(ValueMap &a, ValueMap &b) {return a[5] < b[5];}
...
ValueArray &rows = SomeValueArrayWithValueMaps();
...
Sort(rows, CompareGetDistances);
...
-----
/home/mingo/upp/uppsrc/Core/Algo.h:819:31: error: 'class Upp::ValueArray' has no member named 'Begin'
Sort(c.Begin(), c.End(), less);
-----
Should we have the missing Begin() and End() implemented on ValueArray ?
Thanks in advance for any help !
[Updated on: Mon, 14 April 2014 11:54] Report message to a moderator
|
|
|
|
|
|
Goto Forum:
Current Time: Sat Apr 26 20:35:13 CEST 2025
Total time taken to generate the page: 0.01055 seconds
|