我需要有关新数据类型的帮助,例如INT_PTR。 [英] Please I need help with new data types e.g. INT_PTR.

查看:103
本文介绍了我需要有关新数据类型的帮助,例如INT_PTR。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经阅读了有关新数据类型的各种文档。但每次有一个问题一直存在我的脑海中。新数据类型是指针吗?每个讨论它们的文档总是提到指针和指针算法。



以下问题的答案将帮助我理解这些新数据类型完全。



1.可以声明:INT_PTR *,UINT_PTR *等吗?



2。是。 int * quivalent to。 INT_PTR,

DWORD *相当于DWORD_PTR等?




简而言之这些新数据tyes指针相当于旧的数据类型。如果没有,这些新数据类型与相应的旧数据类型之间的指针关系是什么?



谢谢。

解决方案

这是基础知识。



1. INT_PTR *是指向INT_PTR的指针

2.不是真的,因为INT_PTR解析为x64上的int64 *



如果你想做指针算术和64位可移植代码你需要深刻理解差异。



进一步阅读: http://msdn.microsoft.com/en-us/library/windows/desktop/aa383751(v = vs.85).aspx [ ^ ]

I have read various documentations on the new data types.But each time one question keeps hanging in my mind. Are the new data types pointers?Every documentation that discusses them always make mention of pointers and pointer arithmetic.

The answer to the following questions will help me comprehend these new data types fully.

1. Can one declare : INT_PTR *, UINT_PTR * etc?

2.Is. int * quivalent to. INT_PTR,
DWORD * equivalent to DWORD_PTR, etc?


In short are these new data tyes pointer equivalent of the old data types.If no, what is the pointer relationship between these new data types and the corresponding old data types?

Thank you.

解决方案

it is basic knowledge.

1. INT_PTR* is a pointer to an INT_PTR
2. not really, because a INT_PTR resolves to an int64* on x64

If you want to do pointer arithmetics and 64-portable code you need to deeply understand the differences.

further reading: http://msdn.microsoft.com/en-us/library/windows/desktop/aa383751(v=vs.85).aspx[^]


这篇关于我需要有关新数据类型的帮助,例如INT_PTR。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆