How to sort a 2D array by column

Chris Cain via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jun 7 12:14:00 PDT 2014


> This is my attemot to create a compare object. But I don't know 
> how to use it together with .sort member function


Don't use the .sort property. Use std.algorithm.sort, which has a 
"less" predicate (that should return a bool).

http://dlang.org/phobos/std_algorithm.html#sort


More information about the Digitalmars-d-learn mailing list