#includestdio.h
#defineN80
voidmain()
{
voidcount(charstr[N],int*cap,int*low,int*space,int*num,int*oth);
charstr[N];
inta=0,b=0,c=0,d=0,e=0;
int*cap,*low,*space,*num,*oth;
cap=
low=
space=
num=
oth=
printf(\"输入一个字符串\\n\\n\");
gets(str);
count(str,cap,low,space,num,oth);
printf(\"\\n\\n大写字母个数为:%d\\n\\n小写字母个数为:%d\\n\\n空格个数位:%d\\n\\n数字个数为:%d\\n\\n其他字符个数为:%d\\n\\n\",*cap,*low,*space,*num,*oth);
}
voidcount(charstr[N],int*cap,int*low,int*space,int*num,int*oth)
{
inti;
for(i=0;str!=\'\\0\';i)
{
if(str[
zhaohuantong(赵焕同)12:58:52
i]=\'A\'=\'Z\')(*cap);
elseif(str=\'a\'=\'z\')(*low);
elseif(str==\'\')(*space);
elseif(str=\'0\'=\'9\')(*num);
else(*oth);
}
}
为什么出现extraparameterincalltocount和typemismatchinredeclarrtionof‘count’错误。谢谢!
|