Hello everyone,
I've been trying to make a struct and compiler gives me expected identifier error. Can anyone tell me where is my fault?
struct State { unsigned long Out1; unsigned long out2; unsigned long Time; unsigned long Next[8];}; typedef const struct State STyp; #define gow 0; #define waitw 1; #define gos 2; #define waits 3; #define gop 4; #define fastp 5; STyp FSM[6]={ {0x0c,0x02,500,{gow,gow,wait,waitw,waitw,wait,wait,wait }},//error: expected'}' error: expected identifier or '(' {0x14,0x02,200,{gos,gos,gos,gos,gop,gop,gos,gos}}, {0x21,0x02,500,{gos,waits,gos,waits,waits,wait,waits,waits}}, {0x22,0x02,200,{gow,gow,gow,gow,gop,gow,gop,gop}}, {0x24,0x08,500,{gop,fastp,fastp,fastp,gop,fastp,fastp,fastp}}, {0x24,0x02,200,{gow,gow,gos,gow,gow,gow,gos,gow}}}; //error: extraneous closing brance ('}')
Thank you,