#include static struct sss{ long double f; char snd; } sss; #define _offsetof(st,f) ((char *)&((st *) 16)->f - (char *) 16) int main (void) { printf ("+++Struct longdouble-char:\n")
http://www.codebf.com/read/440906/1778668
#include static struct sss{ char f; struct {float m;} snd; } sss; #define _offsetof(st,f) ((char *)&((st *) 16)->f - (char *) 16) int main (void) { printf ("+++Struct float inside s
http://www.codebf.com/read/440906/1778683
#include static struct sss{ int f; char :0; int i; } sss; #define _offsetof(st,f) ((char *)&((st *) 16)->f - (char *) 16) int main (void) { printf ("+++char zerofield inside struc
http://www.codebf.com/read/440906/1778688
#include static struct sss{ char f; long long a[10]; } sss; #define _offsetof(st,f) ((char *)&((st *) 16)->f - (char *) 16) int main (void) { printf ("++++Array of longlong in struc
http://www.codebf.com/read/440906/1778690
#include class c{ public: char f; }; class c2{ public: short f2; }; static class sss: public c, public c2{ public: char m; } sss; #define _offsetof(st,f) ((char *)&((st *) 16)->f
http://www.codebf.com/read/440906/1778693
+++Struct char inside struct starting with pointer: size=8,align=4 offset-pointer=0,offset-sss-char=4, align-pointer=4,align-sss-char=1
http://www.codebf.com/read/440906/1778697
+++Struct char inside struct starting with int: size=8,align=4 offset-int=0,offset-sss-char=4, align-int=4,align-sss-char=1
http://www.codebf.com/read/440906/1778705
+++Struct int inside struct starting with char: size=8,align=4 offset-char=0,offset-sss-int=4, align-char=1,align-sss-int=4
http://www.codebf.com/read/440906/1778709
+++Struct longdouble inside struct starting with char: size=36,align=12 offset-char=0,offset-sss-longdouble=12, align-char=1,align-sss-longdouble=12
http://www.codebf.com/read/440906/1778711
++Class with char inhereting classes with char & char: size=3,align=1 offset-f=0,offset-f2=1,offset-m=2, align-f=1,align-f2=1,align-m=1
http://www.codebf.com/read/440906/1778712
虫虫下载站 半导体技术网 电子研发网 源码地带 电源技术网 单片机技术网 医疗电子技术 嵌入式系统与单片机