I read that stdint.h is used for portability, but I'm confused.
If I wrote a program on a 32-bit system, uint32_t (unsigned int) is 4-bytes.
But when this program is run on 16-bit system, int is 2bytes and uint32_t (unsigned int) is 2bytes.
I think portability is not guaranteed in this case. Is there anything I am understanding wrong?
uint32_tis always 32 bits. That's why it has 32 in the name.uin32_tbeunsigned intifintis only 16 bits? Sounds rather broken. Where did you get that idea?