uint8_t / uint16_t / uint32_t /uint64_t 數據類型

typedef signed char int8_t typedef unsigned char uint8_t typedef signed int int16_t typedef unsigned int uint16_t typedef signed long int int32_t typedef unsigned long int uint32_t typedef signed long long int int64_t typedef unsigned long long int uint64_t
這個就是uint8_t / uint16_t / uint32_t /uint64_t 定義 c工程跨平臺時用這樣定義避免出錯。

C99標準的C語言硬件爲我們定義了這些類型,我們放心使用就可以了。

 按照posix標準,一般整形對應的*_t類型爲:
1字節     uint8_t
2字節     uint16_t
4字節     uint32_t
8字節     uint64_t


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章