的sizeof(INT)==的sizeof(void *的)? [英] sizeof (int) == sizeof (void*)?
本文介绍了的sizeof(INT)==的sizeof(void *的)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有具有相同的大小作为指针的整数类型?保证所有的微架构?
Is there an integer type with the same size as pointer? Guaranteed on all microarchitectures?
推荐答案
据<一个href=\"http://en.wikipedia.org/wiki/Stdint.h#Integers_wide_enough_to_hold_pointers_.28optional.29\">this维基百科页面,在C99的stdint.h头的可能的声明intptr_t和uintptr_t形式,但随后那当然需要
According to this Wikipedia page, in C99 your stdint.h header might declare intptr_t and uintptr_t, but then that of course requires
- C99
- 已选择实施标准 这个可选部分编译器实现者
- C99
- A compiler implementor which has chosen to implement this optional part of the standard
所以一般我觉得这个是很难的。
So in general I think this one is tough.
这篇关于的sizeof(INT)==的sizeof(void *的)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文