想使用 #define 寫code 在 preprocessor 裡,會顯示錯誤:
Invalid token at start of preprocessor expression
解法:
解法 1,換成流水號:
#define USER_JACK 1
#define USER_QUEEN 2
#define USER USER_JACK
#if USER == USER_JACK
#define USER_VS USER_QUEEN
#elif USER == USER_QUEEN
#define USER_VS USER_JACK
#endif
Or you could refactor the code a little and use C code instead.
解法 2: