您的位置:首页 > 其它

calculate the size of the new type

2010-10-02 23:14 369 查看
You are given have a datatype, say X in C. Determine the size of the datatype,without declaring a variable or a pointer variable of that type, and, of course without using
the sizeof operator!

#define sizeof_macro(type_t) ((unsigned)((type_t *)0 + 1))
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐