使用参数的宏定义

来源:互联网 发布:pix飞控软件 编辑:程序博客网 时间:2024/06/06 09:40


#define SQUARE(x)   x*x

z=SQUARE(2);  //Z=4


#define PSQR(X)  printf("The square of X is %d.\n", (X*X));

PSQR(2);

The square of X is 4



原创粉丝点击