|
请求高手帮助这流水灯的程序明明正确啊 为啥编译总是错误啊 我是菜鸟 急求帮助 麻烦了
#include
#define uint unsigned int
#define uchar unsigned char
uchar code table[]={0xfe,0xfd,0xfb,0xf7,
0xef,0xdf,0xbf,0x7f}
void delay(uint)
void delay(uint z)
{
uint x,y;
for(x=0;x
for(y=0;y<60;y++);
}
void main()
{
uchar i;
while(1)
for(i=0;i<8;i++)
{
P0=table;
delay(60);
}
}
错误信息(用的是keil uvision2 软件)
Build target 'Target 1'
compiling lesson1_4.c...
LESSON1_4.C(6): error C141: syntax error near 'void'
LESSON1_4.C(7): error C141: syntax error near 'void'
LESSON1_4.C(8): error C141: syntax error near '{'
LESSON1_4.C(10): error C141: syntax error near 'for'
LESSON1_4.C(10): error C141: syntax error near '=', expected ')'
LESSON1_4.C(10): error C129: missing ';' before '<'
Target not created
请教各位高手帮忙
|
|