sizeof (int) == sizeof (void*)?

后端 未结 10 925
有刺的猬
有刺的猬 2020-12-03 01:50

Is there an integer type with the same size as pointer? Guaranteed on all microarchitectures?

10条回答
  •  醉酒成梦
    2020-12-03 02:38

    No, the closest you will come to a portable pointer-capable integer type would be intptr_t and ptrdiff_t.

提交回复
热议问题