#include<reg51.h>
#define uchar unsigned char
uchar led[5]={0x7e,0x3c,0x18,0x00,0xff};
uchar num;
sbit key=P1^0;
main()
{
P0=0xff;
num=0;
while(1)
{
if(key==0)
{
while(key==0);
P0=led[num];
num++;
num%=5;
}
}
}
提示C(9):error C141: syntax error near ‘num’ Tar get not created