Does anyone know why this doesn't work:
#define x 5;
...
if(state == x){... }
Does anyone know why I can't do the above comparison?
"I think I wasn't clear. I am getting a compile error. If I replace the x with an actual number, the code compiles correctly."
You were plenty clear. And I thought I was plenty clear when I asked you to manually replace "x" with "5;" - does this look like "good" text-book C code?
if(state == 5;){... }