convert int[][] to int**

bearophile bearophileHUGS at lycos.com
Thu Feb 20 08:47:32 PST 2014


Andrea Fontana:

> I have a C api that need a int** params that represent a 
> int[][]. How can I convert from d to c to pass it? For simple 
> arrays, array.ptr seems to work...

One way to do it (untested):

int** pp = myDArray.map!(a => a.ptr).array.ptr;

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list