#include<reg52.h>
#define D P0;
void delays(unsigned int c);
unsigned char code table[]={ 0x3F, 0x06, 0x5B, 0x4F, 0x66, 0x6D, 0x7D, 0x07,
0x7F, 0x6F, 0x77, 0x7C, 0x39, 0x5E, 0x79, 0x71};
void main()
{
unsigned char i=0;
while(1)
{
D = ~table[i];
i++;
if(i==16)
{
i=0;
}
delays(50);
}
}
void delays(unsigned int c)
{
unsigned char b,a;
for(;c>0;c--)
{for(b=38;b>0;b--)
{ for(c=130;a>0;a--);
}
}
}
測驗.C(11): warning C275: expression with possibly no effect
測驗.C(11): error C141: syntax error near '='
uj5u.com熱心網友回復:
請大神指導一下uj5u.com熱心網友回復:
已發現錯誤在哪 define后面不應該加分號。。。。uj5u.com熱心網友回復:

這錯誤。。。習慣性的加上個;結尾。。。
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/78737.html
標籤:基礎類
上一篇:C++自動識別串口程式
