Help
Advanced Member level 2
Hi,
Why after i add the "code" on structure then the code comeout the error? What can i do?
Thank You.
Why after i add the "code" on structure then the code comeout the error? What can i do?
Code:
#include <reg52.h>
#define uchar unsigned char
#define uint unsigned int
struct code{ uchar time; uint dly; }nxt[] = { {0,10}, {1,20}, {2,30}, {3,40}, {4,50}, {5,60}, {6,70} };
void main()
{
uchar i;
while(1)
{
for(i=0; i<7; i++)
{
P1 = nxt[i].time;
P2 = nxt[i].dly;
}
}
}
Thank You.