编程时总出现这两个错误
"DAC.c", line 40: error: expected a ";"
"DAC.c", line 135: error: identifier "table" is undefined
部分程序是
unsigned char code table[]="0123456789.";
long int a;
while(1)
{
z=a1[0]*100;
q=z/100;
w=(z-100)/10;
e=(z-100)%10;
WriteLcdCom(0xc0);
WriteLcdDat(table[q]);
delay(200);
WriteLcdCom(0xc1);
WriteLcdDat(table[w]);
delay(200);
WriteLcdCom(0xc2);
WriteLcdDat(table[e]);
delay(200);
}
数组定义出了问题吗? 还是少了什么头文件? 麻烦解释一下 |