If I have an integer variable I can use sscanf as shown below by using the format specifier %d.
sscanf (line, "Value of integer: %d\n", &my_integer); Where can I find format specifiers for uint8_t, uint16_t, uint32_t and uint64_t?
uint64_t has probably %lu.
%luforunsigned long? That's often 32 bits.unsigned longis 32 bits, whereas all UNIX and Linux 64 bitsunsigned longare 64 bits.unsigned longis NOT 64 bit on all 64 bit UNIX variants. It's 32 bits on 64 bit solaris using gcc. I once had a painful experience learning that it's 64bits on linux.