2013-09-19 20:48:21spa
以下,宏定義帶參數時,宏名中參數不能加括號:code
1 //對於帶參數的宏定義,參數不能加括號,提示'(' : unexpected in macro formal parameter list 2 //#define MAX((a),(b)) ( (long)((a) - (b)) & (0x1 << (8*sizeof(long) - 1) ) ? (b) : (a) ) 3 4 #define MAX(a,b) ( (long)((a) - (b)) & (0x1 << (8*sizeof(long) - 1) ) ? (b) : (a) )