问题补充说明:#include void main() { char sort0(char c[5][5],int b); char sort1(char c[5][5],int b); int a,m,n; char b,c[5][5]; scanf("%d,%c",&a,&b); for(m=0;m<5;m++) for(n=0;n<5;n++) c[m][n]=' '; switch(a) { case0: sort0(c);break; case1: sort1(c);break; } } char sort0(char c[5][5],char p) { int i,j; for (i=0;i<5;i++) {c[i][0]=p;c[i][4]=p;} for(i=0;i<5;i=i+2) {for(j=1;j<=3;j++) c[i][j]=p;} for(i=0;i<5;i++) {for(j=0;j<5;j++) printf("%c",c[i][j]);} } char sort1(char c[5][5],char p) { int i,j; for(i=0;i<5;i++) c[i][0]=p; for(i=0;i<5;i++) for(j=0;j<5;j++) printf("%c",c[i][j]); } Compiling... 1.c C:\Documents and Settings\Administrator\桌面\1.c(12) : error C2198: 'sort0' : too few actual parameters C:\Documents and Settings\Administrator\桌面\1.c(13) : error C2198: 'sort1' : too few actual parameters C:\Documents and Settings\Administrator\桌面\1.c(17) : warning C4028: formal parameter 2 different from declaration C:\Documents and Settings\Administrator\桌面\1.c(28) : warning C4028: formal parameter 2 different from declaration 执行 cl.exe 时出错. Results
1.obj - 1 error(s), 0 warning(s) 求高手指教
case0:sort0(c);break;case1:sort1(c);break;
sort0,so死迅聚秋土管rt1这两个函数的参数都是两个啊,你调用的时候只给了一个,所以报错
标签:too,反刚,ew
版权声明:文章由 神舟问 整理收集,来源于互联网或者用户投稿,如有侵权,请联系我们,我们会立即处理。如转载请保留本文链接:https://www.shenzhouwen.com/answer/373793.html