void key34x(uchar xuanzhe);//reentrant
void key34()
{
void LCM12864_Clear_Screen();
key=0;
while(key==0){key=kbscan();}
switch(key)
{
case 0xee: yumen_startdisplay(0);key34x(1);break;
case 0xde: yumen_startdisplay(0);key34x(2);break;
case 0x7e: yumen_startdisplay(0);key34x(3);break;
case 0x77: personshow();break;//返回
default: break;
}
}
void key34x(uchar xuanzhe) reentrant
{
uchar jump=1;
uchar xx;
uchar ee=1;;
if(xuanzhe==1) xx=ffrate;
if(xuanzhe==2) xx=clong;
if(xuanzhe==3) xx=unit_price;
if(xuanzhe==4) jump=0;
if(jump==1)
{
if(xx>10)
{ key=0;
while(key==0)
{ key=kbscan();
LCM12864_display(2,8,2*xuanzhe-2,80,shuzi[temp_shi]);
LCM12864_display(2,8,2*xuanzhe-2,80,kongge);
}
switch(key)
{ case 0xd7:b=0;LCM12864_display(2,8,2*xuanzhe-2,32,shuzi[b]);break;
case 0xee:b=1;LCM12864_display(2,8,2*xuanzhe-2,32,shuzi[b]);break;
case 0xde:b=2;LCM12864_display(2,8,2*xuanzhe-2,32,shuzi[b]);break;
case 0x7e:b=3;LCM12864_display(2,8,2*xuanzhe-2,32,shuzi[b]);break;
case 0xed:b=4;LCM12864_display(2,8,2*xuanzhe-2,32,shuzi[b]);break;
case 0xdd:b=5;LCM12864_display(2,8,2*xuanzhe-2,32,shuzi[b]);break;
case 0xbd:b=6;LCM12864_display(2,8,2*xuanzhe-2,32,shuzi[b]);break;
case 0xeb:b=7;LCM12864_display(2,8,2*xuanzhe-2,32,shuzi[b]);break;
case 0xdb:b=8;LCM12864_display(2,8,2*xuanzhe-2,32,shuzi[b]);break;
case 0xbb:b=9;LCM12864_display(2,8,2*xuanzhe-2,32,shuzi[b]);break;
case 0xe7:xuanzhe=xuanzhe+1;key34x(xuanzhe);ee=0; break;
case 0x77:jump=0;personshow();break;//返回
default:break;
}
}
main()
{
key34();
}
出现的问题: error C231: 'key34x': redefini
tion
实在不知道哪里出错了。key34x() 我用了 reentrant 函数。
往哪个大神 帮忙看看。
一周热门 更多>