我在CMD里面运行 argv a 结果是实现 getch();的功能
main(int argc,char *argv[])
{
if(argv[1]=='0')
{
printf("You don\'t input any argument!");
}
else
{
switch(argv[1])
{
case 'a': printf("The argument is \"a\"");break;
case 'b': printf("The argument is \"b\"");break;
case 'c': printf("The argument is \"c\"");break;
case 'd': printf("The argument is \"d\"");break;
case 'e': printf("The argument is \"e\"");break;
case 'f': printf("The argument is \"f\"");break;
case 'g': printf("The argument is \"g\"");break;
case 'h': printf("The argument is \"h\"");break;
}
}
getch();
}