我正试图long long
从控制台使用标准IO功能scanf
.我开始时%lld
:
scanf("%lld", &rule);
抛出:
error: unknown conversion type character 'l' in format [-Werror=format=]
我发现了更多变通方法,但它们也会抛出错误:
scanf("%I64d", &rule); ->error: ISO C does not support the 'I64' ms_scanf length modifier [-Werror=format=] scanf("%"SCNd64"", &rule); ->error: expected ')' before 'SCNd64'
难道我做错了什么?还有另外一招吗?
我正在使用这些标志编译最新版本的MinGw GCC: -pedantic -Wall -Werror -std=c99 -g -D HOME=1