double[][] to double**

Danny Arends Danny.Arends at gmail.com
Sun Feb 10 11:38:34 PST 2013


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 Arends
http://www.dannyarends.nl


More information about the Digitalmars-d-learn mailing list