输入没有问题,问题在输出 printf函数对于输出参数的是按照内存结构解释的,而不是逻辑上的,那么 printf("%d\n%I64d \n%I64u",a,a,a); 这个操作会把3个参数当作int , __int64,__int64 解释,这样就把第一个a的8个字节的前4个字节当作一个int,然后把第一个a的后四个字节和下一个a的前...
For int64_t type: int64_t t; printf("%"PRId64"\n", t); for uint64_t type: uint64_t t; printf("%"PRIu64"\n", t); you can also use PRIx64 to print in hexadecimal. These macros are defined in inttypes.h版权声明:本文为weixin_30194145原创文章,遵循 CC 4.0 BY-SA 版权协议,转...
int64_tt;printf("%"PRId64"\n", t); foruint64_ttype: uint64_tt;printf("%"PRIu64"\n", t); you can also usePRIx64to print in hexadecimal. These macros are defined ininttypes.h