#include class c{ public: char f; }; class c2{ public: char 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/470720/1448581
#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/470720/1448585
#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/470720/1448600
#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/470720/1448605
#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/470720/1448607
#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/470720/1448610
+++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/470720/1448614
+++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/470720/1448622
+++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/470720/1448626
+++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/470720/1448628
虫虫下载站 半导体技术网 电子研发网 源码地带 电源技术网 单片机技术网 医疗电子技术 嵌入式系统与单片机