Use data types defined in stdint.h for better portability. These include:

This is because the data types such as int can vary in size between platforms. It is guaranteed to be at least 16 bits, but is defined to be the “most natural integer representation for a particular platform”, so on a 32-bit machine an int is likely to be 32 bits wide.

Posted: July 19th, 2014 at 5:55 pm
Last Updated on: August 15th, 2017 at 10:53 am

One Pingback/Trackback

One thought on “Portability”

Leave a Reply