我无法摆脱这个警告:
warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ [-Wformat=]
printf("my_number: %#016llx\n", my_number);
在my_test.c中:
#include <stdint.h>
#include <stdio.h>
int main(int argc, char argv[])
{
uint64_t my_number = 0x0706050403020100;
printf("my_number: %#018llx\n", my_number);
return 0;
}
#include <stdint.h>
#include <stdio.h>
#include <inttypes.h>
int main(int argc, char argv[])
{
uint64_t my_number = 0x0706050403020100;
printf("my_number: %#018" PRIx64 "\n", my_number);
return 0;
}