double[][] to double**

2013-02-10 Thread Danny Arends
I need to call some C code which takes a double** In D I have a dynamic array X, Whats a good way of doing this ? #SNIP extern(C){ void toCall(double** X, size_t d1, size_t d2); } void main(){ double[][] X; // How to be able to: toCall(X, X.length, X[0].length); } #/SNIP Danny

Re: double[][] to double**

2013-02-10 Thread Ali Çehreli
On 02/10/2013 11:38 AM, Danny Arends wrote: I need to call some C code which takes a double** In D I have a dynamic array X, Whats a good way of doing this ? #SNIP extern(C){ void toCall(double** X, size_t d1, size_t d2); } void main(){ double[][] X; // How to be able to: toCall(X

Re: double[][] to double**

2013-02-10 Thread Danny Arends
Thanks so much ! Why is this not easy 2 find :P

Re: double[][] to double**

2013-02-10 Thread Ali Çehreli
On 02/10/2013 12:05 PM, Danny Arends wrote: Thanks so much ! Why is this not easy 2 find :P We all know the feeling. :) For future reference: The spec: http://dlang.org/arrays.html#array-properties TDPL: 4.6 Arrays' Maverick Cousin: The Pointer Programming in D: