On Friday, 24 July 2015 at 15:33:45 UTC, Binarydepth wrote:
int liCases [2][];

Those brackets are in the wrong place, you should write that as

int[2][] liCases;


The syntax you used there is a deprecated C compatibility feature. in C, arrays are defined differently and the dimensions go in the opposite direction than in D. (So int a[2][] in C means int[][2] in D - that's why the length doesn't change in that format.)

But write it the D style for most consistency and it will work out. Just be aware that what I wrote is a dynamic array of two elements, not a two element group of dynamic arrays. So indexing is

liCases[i][0] and liCases[i][1] rather than swapping those.
  • Dynamic memory Binarydepth via Digitalmars-d-learn
    • Re: Dynamic memory Adam D. Ruppe via Digitalmars-d-learn
      • Re: Dynamic memory Binarydepth via Digitalmars-d-learn
        • Re: Dynamic memo... Adam D. Ruppe via Digitalmars-d-learn
          • Re: Dynamic ... Binarydepth via Digitalmars-d-learn
            • Re: Dyn... Adam D. Ruppe via Digitalmars-d-learn
              • Re:... Binarydepth via Digitalmars-d-learn
            • Re: Dyn... anonymous via Digitalmars-d-learn
              • Re:... Binarydepth via Digitalmars-d-learn
              • Re:... Binarydepth via Digitalmars-d-learn
                • ... anonymous via Digitalmars-d-learn
                • ... Binarydepth via Digitalmars-d-learn
                • ... Steven Schveighoffer via Digitalmars-d-learn
                • ... Binarydepth via Digitalmars-d-learn

Reply via email to