I saw different types of definition of an integer in stdint.h
. I'll take unsigned 32-bit integer as an example.
uint32_t
means clearly an unsigned integer of 32 bits. That's the one I always use.uint_fast32_t
anduint_least32_t
: What's the difference withuint32_t
and when should I use them instead ofuint32_t
?
And now, I saw uintX_t
where X is 24, 40, 48 and 56. It happens in my code that I have to work with 48 and 56-bit integers. As an example, I suppose uint24_t
is define as something like this :
struct uint24_t { unsigned int the_integer : 24; };
Am I right ? And, Will you suggest me to use uint48_t
for my 48-bit unsigned integers or should I use the normal uint64_t
?
Thanks for your explanations.