In Linux I need to sprintf uint64_t
This is how it defined in "stdint.h"
typedef unsigned long int uint64_t;
What should i pass to sprintf?
In Linux I need to sprintf uint64_t
This is how it defined in "stdint.h"
typedef unsigned long int uint64_t;
What should i pass to sprintf?
The header <inttypes.h> defines macros to be used with the *printf and *scanf functions for the types defined in <stdint.h>.
To format a uint64_t value in decimal:
uint64_t n = ...;
sprintf(str, "%" PRIu64, n);
The PRIu64 macro expands to a string literal, which is concatenated with the "%" to form a valid format string.