Home » U++ Library support » U++ Core » How to sort a vector?
How to sort a vector? [message #37842] |
Fri, 16 November 2012 22:41 |
crydev
Messages: 151 Registered: October 2012 Location: Netherlands
|
Experienced Member |
|
|
I searched all over the forum and documentation and I used Visual Studio intellisense to help me, but I just cannot understand how I should sort a Vector. The Vector in this case is a Vector<MovieInfo>, which is a struct I wrote myself.
I found the different Sort functions but I simply don't understand how they work. I am used to using predicates, delegates and operators using C# to sort arrays and find values in one.
The problem is that I am using a Vector of items with an ArrayCtrl containing those items. I sorted the ArrayCtrl, which makes the indices different from the Vector. To sort my ArrayCtrl I simply used:
Which sorted alphabetically. I need to have the same for my Vector.
Can you help me?
|
|
|
Goto Forum:
Current Time: Sat Apr 27 16:46:17 CEST 2024
Total time taken to generate the page: 0.03548 seconds
|