I am trying to print out an unsigned long long
like this:
printf(\"Hex add is: 0x%ux \", hexAdd);
but I am getting type conv
I had a similar issue with this using the MinGW libraries. I couldn't get it to recognize the %llu or %llx stuff.
Here is my answer...
void PutValue64(uint64_t value) {
char a_string[25]; // 16 for the hex data, 2 for the 0x, 1 for the term, and some spare
uint32 MSB_part;
uint32 LSB_part;
MSB_part = value >> 32;
LSB_part= value & 0x00000000FFFFFFFF;
printf(a_string, "0x%04x%08x", MSB_part, LSB_part);
}
Note, I think the %04x can simply be %x, but the %08x is required.
Good luck. Mark