Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Home » Tip Bank » C++
Language: C++
Expertise: All
Jun 2, 2000



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Integers With Platform-Independent Width

The newly approved C99 standard defines a new header file called < inttypes.h >, which defines sets of typedef names for integer types. One of these sets defines integer types having certain exact widths:

 int8_t     int16_t     int32_t     int64_t

And their exact-width unsigned counterparts are:

 uint8_t    uint16_t    uint32_t    uint64_t

The names are rather intuitive. For example, int8_t is a signed integral type that occupies exactly eight bits. Likewise, uint8_t is an unsigned integral type that occupies exactly eight bits. Use these typedef names when you need integers whose widths are identical on every platform.

Danny Kalev
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date