#include<stdio.h> #include<iostream> int main(int argc,char *argv[]) { printf("参数的个数是(包括第0个当前可执行文件的名字):%d ", argc); //参数列表,字符串指针 while (*argv) { puts(*argv++); } system("pause"); return 0; }
输出: