On Sunday, 6 April 2014 at 09:41:10 UTC, bearophile wrote:
dnspies:What about if I have a 2D array (ie int[][]) and I want to append an empty int[] on the end? Will this work?int[][] nested;
[...]
You can increase by one of the length of the outer array, or you can append an empty one:
[...]
nested ~= [];
That doesn't add an element. [] is interpreted to be an empty int[][]. You need to write [[]] which is an int[][] holding one empty int[].