Empty array and AA literals

dnspies dspies at ualberta.ca
Sat Apr 5 20:28:49 PDT 2014


On Sunday, 6 April 2014 at 03:23:17 UTC, Adam D. Ruppe wrote:
> You can just set it to null. Then, next time you add anything 
> to it, a new one will be automatically created.

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;

nested ~= null;

~ is overloaded, so how does it know what type I intend null to 
be?  How can I specify it?


More information about the Digitalmars-d-learn mailing list