Can someone explain why the code below returns the error:
'SAM1': undeclared identifier
On the 'x=' line?
I would think that the first #define would be fine, then the second #define would be expanded to
#define SAM2 SAM2
which essentially has no effect, so I would expect the error to be
'SAM2': undeclared identifier
after the " int x = SAM1;" is expanded to " int x = SAM2;
but apparently I misunderstand. What does happen in this case?
#define SAM1 SAM2
#define SAM2 SAM1
int x = SAM1;