Re: commanline argument parsing

2009-07-01 Thread grischka
Haojun Bao wrote: grischka writes: If I compile this snippet: #include int main (int argc, char **argv) { int i; for (i = 0; i < argc; ++i) printf("argv[%d] %s\n", i, argv[i]); return 0; } with cygwin GCC and then run it from CMD prompt: C:\cygwin\home\me> test \"st

Re: commanline argument parsing

2009-06-30 Thread Haojun Bao
grischka writes: > If I compile this snippet: > > #include > int main (int argc, char **argv) > { > int i; > for (i = 0; i < argc; ++i) > printf("argv[%d] %s\n", i, argv[i]); > return 0; > } > > with cygwin GCC and then run it from CMD prompt: > > C:\cygwin\home\me> test

commanline argument parsing

2009-06-30 Thread grischka
If I compile this snippet: #include int main (int argc, char **argv) { int i; for (i = 0; i < argc; ++i) printf("argv[%d] %s\n", i, argv[i]); return 0; } with cygwin GCC and then run it from CMD prompt: C:\cygwin\home\me> test \"stuff\" it prints this: argv[0] tes