array help.

2014-07-08 Thread NA via Digitalmars-d-learn
Hi, I have the following array. [ [ [], [], [[0, 1] [0, 2]], [[0, 0] [0, 3]] ] [ [], [], [[1, 1] [1, 2]], [[1, 0] [1, 3]] ] ] and woul

Re: array help.

2014-07-08 Thread NA via Digitalmars-d-learn
On Tuesday, 8 July 2014 at 18:16:55 UTC, bearophile wrote: NA: Any ideas welcome. Is this good enough? void main() { import std.algorithm: swap; int[][][][] a = [[[], [], [[0, 1], [0, 2]], [[0, 0], [0, 3]] ], [[], [],

Re: array help.

2014-07-08 Thread NA via Digitalmars-d-learn
On Tuesday, 8 July 2014 at 18:40:37 UTC, bearophile wrote: NA: will not work and no I can't sort it. Why no sort? Thanks, It works as expected. As for the sort - wasn't thinking straight. Cheers, NA