On Wednesday, 30 August 2017 at 22:48:45 UTC, Adam D. Ruppe wrote:
On Wednesday, 30 August 2017 at 22:22:23 UTC, Azi Hassan wrote:
extern(C) int main(int argc, char*[] argv, char*[] env)


That's a D array of pointers. A D array is larger than a C "array" argument, thus you're skipping past it.

The correct declaration is (int argc, char** argv, char** env).

(I'd argue that is the correct way to write it in C too, that's how I always do and it works there. But I just loathe C's arrays anyway.)

Brilliant, thanks ! I just re-read the blog post and it uses the char** syntax too, but I didn't pay attention to it.

Reply via email to