Fixed Width Integer Types And Compatibility Issues

C99 and current C++ version support some fixed width integer types like int64_t and uint64_t, and provide some associated, portable printf format specifiers like PRId64.

The types are defined in <stdint.h>, and the format specifiers are defined in <inttypes.h>, which includes <stdint.h>.

Some older build environments don't support these types, but provide some fixed width types with proprietary names, and associated proprietary format specifiers to be used with printf and friends, and possibly even provide <stdint.h> or <inttypes.h> files which aren't compatible with the C99 standard.

Older versions of Microsoft or Borland compilers don't support the C99 fixed with types

Visual Studio 6:

Borland C++:

%L is specific to Borland, so %I64 should be used preferably.


Martin Burnicki 2016-04-26 14:39