int定义的问题
#include "reg51.h"#define uchar unsigned char
#define uint unsigned int
sbit p1=P2^0;
sbit p2=P2^1;
sbit p3=P2^2;
sbit p4=P2^3;
sbit p5=P2^4;
sbit p6=P2^5;
sbit p7=P2^6;
sbit p8=P2^7;
void mDelay(uint Delay)
{ uint i;
for(;Delay>0;Delay--)
{ for(i=0;i<124;i++)
{;}
}
}
void main()
{
p1=0;
mDelay(500);
p1=1;
int i;
i=0;
for(i=0;i<3;i++)
{
}
错误C141:syntax error near ‘int’
错误C202‘i’:undefined identifier
这两个错误怎么解决 不知道怎么定义 。。求教