Quote:
Originally Posted by jasonp
If you include inttypes.h, you get macros to insert into format strings that will print 64-bit values correctly. On my mingw installation they are
Code:
inttypes.h:#define PRId64 "I64d"
inttypes.h:#define PRIi64 "I64i"
inttypes.h:#define PRIo64 "I64o"
inttypes.h:#define PRIu64 "I64u"
inttypes.h:#define PRIx64 "I64x"
inttypes.h:#define PRIX64 "I64X"
Admittedly it makes the format string painful to write, i.e.
printf("I have computed %" PRId64 "\n", answer);
|
Ugly but portable :) . Thanks.