标签: d
我需要生成int []数组。我怎么做方法iota返回uint,但我需要获取int s:
int []
iota
int
int [] myarr2 = (iota(0, 10).array);
app.d(11): Error: cannot implicitly convert expression (array(iota(0, 10))) of type uint[] to int[]
答案 0 :(得分:3)
int[] myarr2 = iota!(int)(0, 10).array;