我一直在阅读这篇文章,并且怀疑打印此数据类型的正确且可移植的方法是什么?
uint_fast8_t
uint_fast16_t
uint_fast32_t
uint_fast64_t
Run Code Online (Sandbox Code Playgroud)
也签了。
包含<inttypes.h>并使用其中的宏
#include <inttypes.h> // <inttypes.h> also includes <stdint.h> on its own
uint_fast8_t a = 0;
uint_fast16_t b = 0
uint_fast32_t c = 0;
uint_fast64_t d = 0;
printf("%" PRIuFAST8 " %" PRIuFAST16 " %" PRIuFAST32 " %" PRIuFAST64 "\n", a, b, c, d);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
168 次 |
| 最近记录: |