Keil4中出现如下错误,怎么改都不行 :main.c(10): error C141: syntax error near '}'

#ifndef _INT_H_
#define _INT_H_
void int0();
void timer0();
void inition();
#endif
#define uchar unsigned char
#include<reg51.h>
#include"INT.H"

void inition()
{
TMOD=0x01;//选择定时器0并选择工作方式1
TH0=0xec;
TL0=0x78;
P1=0x00;
EA=1;
ET0=1;
TR0=1;
while(1);
{
;
}
}

void int0() interrupt 0
{
static uchar i=0;
i++;
if(i%2)
TR0=1;
else
{
TR0=0;P1=0;
}
}

void timer0() interrupt 1
{
int i=100;
char temp=0x01;
TH0=0xec;
TL0=0x78;
i--;
if(i<=0)
{
P1=temp;
temp=temp<<1;
i=100;
}
}
#include<reg51.h>
#include"INT.H"

char i=100;
char temp=0x01;

void main()
{
inition()
}

大哥,提示得这么明显,在main.c文件中的弟十行错误,你调用inition函数没有分号
温馨提示:答案为网友推荐,仅供参考
相似回答