求高手来看看问题在哪儿!!!!
Expression syntax in function yes_or_no,即yes_or_no中表达式有错,但不知问题在哪儿!!以下是部分代码。
int yes_or_no(int y)
{
int key;
int row=1;
int x=1;
setfillstyle(1,7);
bar(260,y,373,y+60);
setcolor(6);
rectangle(260,y,373,y+60);
setcolor(0);
rectangle(261,y+1,372,y+59);
setfillstyle(1,3);
bar(265,y+15,315,y+45);
rectangle(265,y+15,315,y+45);
bar(317,y+15,367,y+45);
rectangle(317,y+15,367,y+45);
settextstyle(1,0,3);
outtextxy(270,y+15,"YES");
outtextxy(327,y+15,"NO");
putimage(265,y+15,buf_yn,1);
while(1)
{
key=getkey();
switch(key)
{
case Left:
if(x==1)
{
putimage(265,y+15,buf_yn,1);
putimage(317,y+15,buf_yn,1);
x=0;
}
else if(x==0)
{
putimage(317,y+15,buf_yn,1);
putimage(265,y+15,buf_yn,1);
x=1;
}
break;
case Right:
if(x==1)
{
putimage(265,y+15,buf_yn,1);
putimage(317,y+15,buf_yn,1);
x=0;
}
else if(x==0)
{
switch(key)
{
case Up:
switch(row)
{
case 1:
putimage(317,y+15,buf_yn,1);
putimage(265,y+15,buf_yn,1);
x=1;
}
break;
case 28:
return x;
default:
break;
}
}
}
/*选择排序方法菜单对话框*/
int sort_method(char**s,int y)
{
int i;
int key;
int row=1;
setfillstyle(1,7);
bar(230,y,400,y+3*30+10);
setcolor(15);
rectangle(230,y,400,y+3*30+10);
setcolor(0);
line(400,y,400,y+3*30+10);
line(230,y+3*30+10,400,y+3*30+10);
for(i=0;i<3;i++)
{
outtextxy(234,y+5+i*30,s[i]);
}
putimage(232,y+3,buf_sub,1);
while(1)
{
key=getkey();
putimage(232,y+(row-1)*30+3,buf_sub,1);
row=3;
putimage(232,y+(row-1)*30+3,buf_sub,1);
break;
case 2:
putimage(232,y+(row-1)*30+3,buf_sub,1);
row=1;
putimage(232,y+(row-1)*30+3,buf_sub,1);
break;
case 3:
putimage(232,y+(row-1)*30+3,buf_sub,1);
row=2;
putimage(232,y+(row-1)*30+3,buf_sub,1);
break;
default:
break;
}
break;/*如果缺少break上方向键就不能用了*/
case Down:
switch(row)
{
case 1:
putimage(232,y+(row-1)*30+3,buf_sub,1);
row=2;
putimage(232,y+(row-1)*30+3,buf_sub,1);
break;
case 2:
putimage(232,y+(row-1)*30+3,buf_sub,1);
row=3;
putimage(232,y+(row-1)*30+3,buf_sub,1);
break;
case 3:
putimage(232,y+(row-1)*30+3,buf_sub,1);
row=1;
putimage(232,y+(row-1)*30+3,buf_sub,1);
break;
default:
break;
}
break;
case 28:
return row;
default:
break;
}
}
}
错误提示在这儿:int sort_method(char**s,int y)
Expression syntax in function yes_or_no