gpt4 book ai didi

32bit-64bit - 使用 inttypes.h 中的 PRId64 时 Eclipse 显示语法错误

转载 作者:行者123 更新时间:2023-12-02 02:10:33 24 4
gpt4 key购买 nike

当我这样做

#include <inttypes.h>
long long value = 0;
printf("An 8 byte long integer value: %"PRId64".", value);

Eclipse 显示 printf 行中的语法错误。任何人都知道如何摆脱它?这是我所知道的让 printf 在 32 位和 64 位架构上工作的唯一方法,每隔几行 Eclipse 错误就很难看到真正的问题。

谢谢!

最佳答案

问题已回答here .

需要在Project Properties->C/C++ General->Paths and Symbols中添加__STDC_FORMAT_MACROS

关于32bit-64bit - 使用 inttypes.h 中的 PRId64 时 Eclipse 显示语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13179552/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com