sue@sue-G480:~/workspace/les3$ ./m3.out -l -a fdasd dad
argv is 5
argc[-1074445397] is 5
argc[-1074445388] is 5
argc[-1074445385] is 5
argc[-1074445382] is 5
argc[-1074445376] is 5
argc[0] is 5
成这个样子了这是什么情况啊
printf("argc[%d] is %s", i, argc[i]);
后面两个参数应该是这样
#include <stdio.h>
int main(int argc,char *argv[])
{
printf("hello world\n");
for(int i = 0; i < argc; i++)
{
printf("argv[%d] is %s\n", i, argv[i]);
}
return 0;
}