Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Sorting a ValueArray ?
Sorting a ValueArray ? [message #42911] Mon, 14 April 2014 11:49 Go to previous message
mingodad is currently offline  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

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Testscatter2 issue
Next Topic: Convert C# code to U++?
Goto Forum:
  


Current Time: Mon May 13 05:09:58 CEST 2024

Total time taken to generate the page: 0.01354 seconds