#define 宏

1. 例子

C
1#define PI 3.14159f
2#define SQUARE(x) ((x) * (x))
3 
4float a = SQUARE(1 + 2); // 期望 9,注意括号

2. 陷阱