jeudi 17 août 2017

inptr_t and size_t on 32/64 bit platform

When to use intptr_t, size_t data type. On 32 bit platform both intptr_t and size_t is set to 32 bit, on 64 bit platform it is set to 64 bit. Is there any any usage guidelines. When we use it along with printf, posix says use %z for size_t and says PRIdPTR for intprt_t. Can we use %z instead of PRIdPTR when trying to print intptr_t ?

Aucun commentaire:

Enregistrer un commentaire