2015年12月28日 星期一

Implementation of sizeof operator

#define my_sizeof(x) ((&x + 1) - &x)
#define my_sizeof(x) ((char *)(&x + 1) - (char *)&x)

沒有留言: