偶然发现在C中sizeof(void)是合法的,于是,对它的作用产生了疑问.查阅资料在GNU文档中发现如下解释: In GNU C, addition and subtraction operations are supported on pointers to void and on pointers to functions. This is done by treating the size of a void or of a function as 1. A consequence of…
原文:http://blog.sina.com.cn/s/blog_7c983ca60100yfdv.html#SinaEditor_Temp_FontName (1) sizeof是操作符,不是函数. MSDN:The sizeof keyword gives the amount of storage, in bytes, associate with a variable or a type(including aggregate types). This keyword ret…