Re: How to create an array with custom length?

2020-03-27 Thread Anonymouse via Digitalmars-d-learn
On Friday, 27 March 2020 at 19:30:39 UTC, Quantium wrote: Code int n=0; readf(" %d", ); int[n] m; generated an error (DMD compiler): Cannot read n at compile time. How to create an array with custom length? The tour has a page for this: https://tour.dlang.org/tour/en/basics/arrays

How to create an array with custom length?

2020-03-27 Thread Quantium via Digitalmars-d-learn
Code int n=0; readf(" %d", ); int[n] m; generated an error (DMD compiler): Cannot read n at compile time. How to create an array with custom length?