#define FPOS( type,field ) \ /*lint -e545 */ ( (dword) &(( t
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/07/08 03:05:25
#define FPOS( type,field ) \ /*lint -e545 */ ( (dword) &(( type *) 0)-> field ) /*lint +e545 */
.谢谢另外“\”代表什么
.谢谢另外“\”代表什么
续行符
再问: 那些代码什么意思啊。。。谢谢
再答: #define FPOS( type, field ) ( (dword) &(( type *) 0)-> field ) 去掉注视后就是这句话。 获取结构体某元素的相对偏移
再问: (( type *) 0)这个什么意思。。。为什么后面还有个0.。。。
再答: 把0 转换为 type* 类型的指针
再问: 额。。为什么要把0转换为type* 类型的指针??
再答: struct {int a,int b} A; 要获取b元素相对于A的偏移地址 (DWORD) ( &(&A)->b)-(DWORD)(&A) 因为只是获取相对偏移,A的具体地址无所谓,而且A的地址是0的话,可以不用减。只保留前部分 (DWORD) ( &(0)->b) 但这样肯定没法编译的,0只是一个数值。原来可以,因为&A是A类型的指针。 所以需要将0进行类型转换。 于是 (DWORD) ( &(type*)0)->b)
再问: 那些代码什么意思啊。。。谢谢
再答: #define FPOS( type, field ) ( (dword) &(( type *) 0)-> field ) 去掉注视后就是这句话。 获取结构体某元素的相对偏移
再问: (( type *) 0)这个什么意思。。。为什么后面还有个0.。。。
再答: 把0 转换为 type* 类型的指针
再问: 额。。为什么要把0转换为type* 类型的指针??
再答: struct {int a,int b} A; 要获取b元素相对于A的偏移地址 (DWORD) ( &(&A)->b)-(DWORD)(&A) 因为只是获取相对偏移,A的具体地址无所谓,而且A的地址是0的话,可以不用减。只保留前部分 (DWORD) ( &(0)->b) 但这样肯定没法编译的,0只是一个数值。原来可以,因为&A是A类型的指针。 所以需要将0进行类型转换。 于是 (DWORD) ( &(type*)0)->b)
#define FPOS( type,field ) \ /*lint -e545 */ ( (dword) &(( t
英语翻译You define the specifications for each type of payment t
#define TAILQ_INSERT_AFTER(head,listelm,elm,field) do { \
lint comb removal
field,.
如何打开AE中的particular插件中rendering的下列depth of field type按钮?
英语翻译原句是:n-type field-effect transistors made of an individua
打开传奇数据库工具出现table1:type mismatch for field'序号',expecting:inte
Help!The computer can't type Chinese
can't type English with this computer
What has fingers but can't type
I can't type in Chinese here