void main() { char *strings[N]; file://定义一个一维指针数组strings char str[80]; cout<<"At each prompt, enter a string:/n"; for (int i=0; i { cout<<"Enter a string #"<xml:namespace prefix = i<<" /> cin.getline(str, sizeof(str)); strings[i] = new char[strlen(str) + 1]; strcpy(strings[i], str); } cout< for (i=0; i cout<<"String #"< }
#include void main(int argc, char *argv[]) { cout<<"The number of command line arguments is:"< cout<<"The program name is:"< if (argc>1) { cout<<"The command line arguments:/n"; for (int i=1; i cout< } }