32/64位平台printf uint64的方法
摘要:
在32位平台 typedef unsigned long long int uint64_t;在64位平台 typedef unsigned long int uint64_t;不同的typdef,要求在printf中使用不同的length modifier,uint64_t 在32位使用ll,在64位使用l。除了定义数据类型,C99还定义了相应数据类型的打印方式,使用PRIu64打印uint64,举例如下: 1 #include <stdio.h> 2 #include <inttypes.h> 3 4 int main(int argc, char *argv[]) 阅读全文
posted @ 2012-06-06 15:20 Lo0ong 阅读(10556) 评论(0) 推荐(0)
浙公网安备 33010602011771号