#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("什么都不是");
}
大家不用提交了,解决了。这是第二个版本的,挺简单,挺幼稚吧?