-
inttypes.h
鎖定
inttypes.h是標準C函數庫的頭文件,提供整數輸入的各種轉換宏。在系統中,其所在路徑為:/usr/include/inttypes.h
- 中文名
- 跨工程公共代碼
- 外文名
- inttypes.h
- 目 的
- 提供各種進制的轉換宏
inttypes.h宏定義示例
舉個例子,PRIi8、PRIu8、PRIo8以及PRIx8,其中i為有符號,u為無符號,o為8進制以及x為16進制。
inttypes.h示例代碼
#include <stdio.h> #include <inttypes.h> int main() { uint64_t a = 5; printf("a=%" PRIu64 "\n", a);//兩個雙引號之間要有空格 return 0; }
- 詞條統計
-
- 瀏覽次數:次
- 編輯次數:4次歷史版本
- 最近更新: 早春的树木8