c - How can be size of variable guaranteed -
i have variable must 16 bit long. how should define 16 bit independently on platform?
i can define short
, depending on platform can 16 bits or more.
assuming you're using c99, use uint16_t
(or int16_t
) <stdint.h>
. these guaranteed exist long compiler has underlying 16-bit type available.
Comments
Post a Comment