How to Deify char**

WhatMeWorry via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue May 17 12:37:35 PDT 2016


I'm weak enough with C pointers, but when I see char** my brain 
freezes up like a deer caught in headlights. Can anyone translate 
the below C call into D?



ALURE_API const ALCchar** ALURE_APIENTRY 
alureGetDeviceNames(ALCboolean all,ALCsizei *count)

// my poor attempt to Deify it

int count;
const char[][] allDevice = alureGetDeviceNames(true, &count);

// and the inevitable error

alure_stuff.d(190): Error: cannot implicitly convert expression 
((*alureGetDeviceNames)(cast(byte)1, & count)) of type char** to 
const(char[][])



Thanks. (And I have been staring at docs for hours)


More information about the Digitalmars-d-learn mailing list