Re: Compiling under Windows using MSCV



>   char *argv[1];
>    argv[0] = "foo";
>   int argc = 0;
>
>   return main(argc, argv);

Or even:

#include <stdlib.h>
...
  return main (__argc, __argv);

__argc and __argv are set up by the C runtime at startup based on the
command line used to start the process even for WinMain programs.

--tml


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]