2016年7月5日

摘要: 以前看来#号,好像只是预编译,原来它还可以有跟Swift中"\( )"的拼接功能 例如: #define string(x) #x 意思就是 string(x) = "x"; 然后还是一个高级拼接: #define printxvar(n) printf("%i\n", x ## n) 意思就是输出 阅读全文
posted @ 2016-07-05 17:41 kptanjunhao 阅读(174) 评论(0) 推荐(0) 编辑
 
摘要: Macros A definition that takes arguments, particularly more than one, is often known as a macro: #define SQUARE(x) x * x Incidentally, the previous de 阅读全文
posted @ 2016-07-05 17:08 kptanjunhao 阅读(194) 评论(0) 推荐(0) 编辑