View previous topic :: View next topic |
Author |
Message |
jaker49
Joined: 19 Jun 2009 Posts: 4
|
Posted: Fri Jun 19, 2009 4:22 pm Post subject: Dynamic Allocation of Rectangular Arrays |
|
|
Howdy y'all. I'm new to D (coming from C++, Python, and Oberon).
The D doc says we can do this;
float [] [] matrix;
But it doesn't say how to dynamically allocate. How do I allocate for a 3x4 matrix?
matrix = new float ?????
Thanks (in advance). |
|
Back to top |
|
|
csauls
Joined: 27 Mar 2004 Posts: 278
|
Posted: Sat Jun 20, 2009 12:53 pm Post subject: |
|
|
float[][] matrix = new float[][](3, 4); _________________ Chris Nicholson-Sauls |
|
Back to top |
|
|
jaker49
Joined: 19 Jun 2009 Posts: 4
|
Posted: Sat Jun 20, 2009 2:37 pm Post subject: |
|
|
That's exactly what I needed. Thanks. |
|
Back to top |
|
|
|