Yeah, you have to use a global variable instead of a define. Of course, then you can't use it to substitute for a different variable name (the struct).
Originally Posted by ItsAaron
The reason you can use a #define to do that is the same reason it CANNOT be changed. #defines are "preprocessor" events. Before the code is compiled, the preprocessor goes through it and literally replaces all instances of the define label with it's definition. So when the code is compiled, "curplay" has been replaced with curplay1. So your code would look like:
Nb. you also used = instead of ==.
if (play1==play1) play1=play2;
That will work if play1 and play2 are pointers to structs, but it will not work if they are actually structs.
Really, you should just be using a global pointer (and not a define) for this, as laserlight says.