Reuse/reset dynamic rectangular array?

Robert M. Münch robert.muench at saphirion.com
Sat May 25 14:28:24 UTC 2019


How can I reset a rectangualr array without having to loop through it?

int[][] myRectData = new int[][](10,10);

myRectData.length = 0;
myRectData[].length = 0;		
myRectData[][].length = 0;	

They all give: slice expression .. is not a modifiable lvalue.

-- 
Robert M. Münch
http://www.saphirion.com
smarter | better | faster



More information about the Digitalmars-d-learn mailing list