Dynamic multidimensional arrays

Bellum viautbellum at gmail.com
Mon Jul 4 23:42:31 PDT 2011


Can anyone point me in the right direction for doing something like this 
in D:

     char[][] anArray;
     int rows, cols;

     ...

     anArray = new char[rows][cols];

It isn't possible in this way because "rows cannot be read at compile 
time", which seems to me to be the point of dynamic arrays. :P


More information about the Digitalmars-d-learn mailing list