- 博客(3)
- 收藏
- 关注
原创 No Memory Alignment with GCC
attribute method:#include struct packed{ char a; int b;} __attribute__((packed));struct not_packed{ char a; int b;};int main(void){ printf("Packed: %zu\n", sizeof(
2014-06-24 18:13:43 974
转载 Variadic Macros
Variadic Macrosmacro can be declared to accept a variable number of arguments much asa function can. The syntax for defining the macro is similar to that ofa function. Here is an example: #defin
2014-06-24 17:53:45 1015
原创 Stringification in C
#define xstr(s) str(s) #define str(s) #s #define foo 4 str (foo) ==> "foo" xstr (foo) ==> xstr (4) ==> str (4) ==> "4"
2014-06-24 17:23:08 599
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人