摘要: #define SQR(x) printf("the squar of x is %d\n",((x)*(x)))如果直接调用SQR(8),则输出the squar of x is 64也就是“”中的字符x被当作普通字符来处理,没有被8替换掉修改宏定义如下:#define SQR(x) printf("the squar of “#x ”is %d\n",((x)*(x)))再调用SQR(8),则输出the squar of 8 is 64#的作用就是可以把语言符号转换为字符串 阅读全文
posted @ 2012-11-22 12:11 枫部落 阅读(193) 评论(0) 推荐(0) 编辑
点击这里给我发消息