argv[2] 指向执行程序名后的第二个字符串
如:
int _tmain(int argc, _TCHAR* argv[]) { printf("%d\n",argc); while (argc) { //不同的编译器不同,如果%s只能打印出第一个字符,那么改成%S printf("%s\n",argv[--argc]); } return 0; }
在CMD下运行: