How macro could be used to calculate offset of fields in a structure?

前端 未结 0 1950
独厮守ぢ
独厮守ぢ 2021-02-19 07:50

I have defined a macro that calculates the offset of a structure to any of the structure field. The Code is as follow:

#define offset(struct_name, fld_name) \\
(u         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题