C语言怎么指出错误,C语言编译出错,望指出错误!

#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("什么都不是");

}

大家不用提交了,解决了。这是第二个版本的,挺简单,挺幼稚吧?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值