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]