Suppose I want to redirect a set of command-line options to a C function declared as follows using D main accepting args
extern (C) void init(int argc, char** argv); void main(string[] args) { init(args.length, map!(toStringz)(args)); }
The first parameter is quite simple, but my attempt to apply toStringz to the args array does not work. I get cannot implicitly convert expression (map(args)) of type MapResult!(toStringz,string[]) to char** . How to convert string[] to char** (or even const(char)** ).
source share