Chinaunix
标题:
如何打印uint64_t的数据
[打印本页]
作者:
rick_cheung
时间:
2010-11-23 16:24
标题:
如何打印uint64_t的数据
我用了%lu、%ld都不行,用%lu是提示:warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘uint64_t’
请问应该用什么才能打印出uint64_t类型的数据?操作系统是32位的centOS。
作者:
samlumengjun
时间:
2010-11-23 17:03
%llu
作者:
duanjigang
时间:
2010-11-23 19:02
32位%llu,64位%lu就行
作者:
root_micheal
时间:
2012-07-28 11:56
2楼正解 多谢
作者:
hbmhalley
时间:
2012-07-30 15:07
#include <inttypes.h>
#include <stdio.h>
int main (void) {printf ("%"PRIu64 , (uint64_t)1) ;}
复制代码
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2