结构体中某字段的偏移值

1、头文件

  #include <stddef.h>

2、

  size_t offsetof(结构体名, 字段名);

  举例子:

    size_t iOffset = offsetof(IMAGE_DOS_HEADER, e_lfanew);

3、

原文地址:https://www.cnblogs.com/cppskill/p/5569412.html