error: expected expression before 'struct'

错误原因:

  使用了offsetof函数,却没有包含头文件<stddef.h>

解决办法:

  包含<stddef.h>

原文地址:https://www.cnblogs.com/yongdaimi/p/9292824.html