#include<reg51.h>
typedef unsigned char u8;
typedef unsigned int u16;
sbit a=P2^2;
sbit b=P2^3;
sbit c=P2^4;
u8 code duan[17]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,
0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71}
void main()
{
a=0;
b=0;
c=0;
P0=smgduan[0];
while(1);
}
段码申明那里少一个分好;
#include<reg51.h>