calculate the size of the new type
2010-10-02 23:14 wansishuang 阅读(227) 评论(0) 收藏 举报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))
浙公网安备 33010602011771号