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!
the sizeof operator!
#define sizeof_macro(type_t) ((unsigned)((type_t *)0 + 1))
相关文章推荐
- 解决The method onClick(View) of type new View.OnClickListener(){} must override a superclass错误
- Android 错误 The method onClick(View) of type new View.OnClickListener(){} must override a superclass
- how to calculate the textsize of TLatex in CernRoot
- No enclosing instance of type Outer is accessible. Must qualify the allocation with an enclosing instance of type Outer (e.g. x.new A() where x is an instance of Outer)
- Android 错误 The method onClick(View) of type new View.OnClickListener(){} must override a superclas
- No enclosing instance of type E is accessible. Must qualify the allocation with an enclosing instance of type E(e.g. x.new A() where x is an
- Android 错误 The method onClick(View) of type new View.OnClickListener(){} must override a superclas
- Android 错误 The method onClick(View) of type new View.OnClickListener(){} must override a superclas
- New Memory allocation 1046759 bytes is smaller than the minimum allocation size of 1048576 bytes.
- The Valued Prospects of New Type Impact Crusher
- java编译时出现Must qualify the allocation with an enclosing instance of type AAA (e.g. x.new A() where x
- Android 错误 The method onClick(View) of type new View.OnClickListener(){} must override a superclas
- hibernate:newclass.hbm.xml文件错误(the content of element type "class" must match "(meta*,column*,type?generator?...)
- The method onClick(View) of type new View.OnClickListener(){} must override a superclass
- Android 错误 The method onClick(View) of type new View.OnClickListener(){} must override a superclass
- No enclosing instance of type Demo is accessible. Must qualify the allocation with an enclosing instance of type Demo (e.g. x.new A() where x is an instance of Demo).
- eclise -The method onClick(View) of type new View.OnClickListener(){} must override a superclass method
- The size of base data type in Ubuntu-AMD64
- Android 错误 The method onClick(View) of type new View.OnClickListener(){} must override a superclass
- Android 错误 The method onClick(View) of type new View.OnClickListener(){} must override a superclass