我写了一个非常简单的printf uint64_t测试代码:
#include <inttypes.h>
#include <stdio.h>
int main()
{
uint64_t ui64 = 90;
printf("test uint64_t : %" PRIu64 "\n", ui64);
return 0;
}
我使用ubuntu 11.10(64位)和gcc版本4.6.1对其进行编译,但失败了:
main.cpp: In function ‘int main()’:
main.cpp:9:30: error: expected ‘)’ before ‘PRIu64’
main.cpp:9:47: warning: spurious trailing ‘%’ in format [-Wformat]
陪伴而非守候
繁花如伊
慕哥9229398