/************************************************************************************ Author: tanxiaohai Data: 2014-05-12 Brief: 打印參數(shù)的個(gè)數(shù),,且每個(gè)參數(shù)。注(參數(shù)個(gè)數(shù)為:argc-1.argv[0]為執(zhí)行程序名) ************************************************************************************/ #include <iostream> using namespace std; int main(int argc,char *argv[]) { int i=0; while('\0'!=argv[i]) { cout<<"argc:"<<argc<<endl; cout<<"argv:"<<argv[i]<<endl; i++; } return 0; }
|
|