Arce 发表于 2021-7-6 15:49:51

error: format %d expects argument of type int, but argument 5 has type int64_t {

  error: format '%d' expects argument of type 'int', but argument 5 has type 'int64_t {aka long int}' [-Werror=format=]
  原因:数据格式化不正确,可能导致在32位和64位机上编译器解释不统一。
  解决:
  #include <inttypes.h>  
printf("%" PRId64 "\n", value);  

  
文档来源:51CTO技术博客https://blog.51cto.com/u_14832233/2991173
页: [1]
查看完整版本: error: format %d expects argument of type int, but argument 5 has type int64_t {