2013-09-19 20:48:21

如下,宏定义带参数时,宏名中参数不能加括号:

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) )

 

相关文章:

  • 2021-06-24
  • 2022-12-23
  • 2022-12-23
  • 2022-03-03
  • 2022-12-23
  • 2021-06-13
  • 2022-02-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-21
  • 2022-12-23
  • 2021-03-31
  • 2021-10-27
  • 2022-12-23
  • 2021-06-27
相关资源
相似解决方案