cross-platform printing of 64-bit integers with printf
There are a couple of approaches. You could write your code in C99-conforming fashion, and then supply system-specific hacks when the compiler-writers let you down. (Sadly, that’s rather common in C99.) #include <stdint.h> #include <inttypes.h> printf(“My value is %10” PRId64 “\n”, some_64_bit_expression); If one of your target systems has neglected to implement <inttypes.h> or has … Read more