On 01/02/2012 11:04 PM, RenatoL wrote:
auto r = new int[][5];
this is ok

auto r = new int[][];
this is not ok
Error: new can only create structs, dynamic arrays or class objects
, not int[][]'s

why?

What would you expect the code to do?
What you are trying to achieve is similar to:

class Array(T){this(size_t length){...}}
auto r = new Array!(Array!int); // error: missing constructor argument

Reply via email to