On Tuesday, 23 January 2024 at 18:15:29 UTC, Stephen Tashiro wrote:
If the constructor of a class needs to create an array of structs whose dimensions are inputs, what's the syntax for doing this?

For a non-example, the following program errors in main() because in t.array[][] "index [0] is out of bounds".

You need to remove `auto` from
`auto array = new Point[][](the_dimension,the_dimension);`
because it creates a new variable.

Reply via email to