On Friday, 24 July 2015 at 15:22:15 UTC, Binarydepth wrote:
I want to use memory based on user input. In this case declare a bi-dimensional array (int[2][var]), var being the user input.

Declare:

int[2][] your_array;

your_array.length = var;


The runtime will handle the dynamic memory allocation for you when you set the length on a slice.

Reply via email to