本文共 725 字,大约阅读时间需要 2 分钟。
#include
#include
#include "process.h"
#include "stdlib.h"
int main()
{ int y;
char c;
int mode = P_WAIT;
scanf("%d",&y);
switch(y){
case 21: printf("hahah");break;
case 31: getq(c);break;
case 41: printf("nihao");break;
case 43: printf("43");break;
case 56:
spawnl(mode,"bieyongcuo.exe",NULL);break;
}
//后来发现没法结束了,到底是哪一句有影响了?
getch();
return 0;
}
getq() { //停在这里显示的错误为:24 an argument type that has a default promotion can't match an empty parameter name list declaration
//11 previous implicit declaration of 'get' was here
char c;
c=getchar();
if(c==' ')
printf("这是一个空格");
else if(c>='0'&&c<='9')
printf("这是数字");
else if(c>='a'&&c<='z'||c>='A'&&c<='Z')
printf("这是字符");
else
printf("什么都不是");
}
大家不用提交了,解决了。这是第二个版本的,挺简单,挺幼稚吧?
转载地址:https://blog.csdn.net/weixin_30596151/article/details/117117349 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!