会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
kptanjunhao
2016年7月5日
ObjC宏定义-预编译小功能
摘要: 以前看来#号,好像只是预编译,原来它还可以有跟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)
编辑
ObjC宏定义小细节
摘要: 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)
编辑
公告
导航
博客园
首页
新随笔
新文章
联系
订阅
管理