[u]intN_t - uint8_t, uint16_t, uint32_t, uint64_t
uint8_t, uint16_t, uint32_t, uint64_t
在c/c++中,很多以_t
結尾的資料型別,如uint8_t
,size_t
等等,乍一看什麼鬼,實際上_t
的意思就是typedef
的字尾縮寫。具體如下:
C99標準中inttypes.h
的內容
/*
inttypes.h: C99標準中inttypes.h的內容
Contributors:
Createdby Marek Michalkiewicz <marekm@linux.org.pl>
THISSOFTWARE IS NOT COPYRIGHTED
Thissource code is offered for use in the public domain. You may
use,modify or distribute it freely.
Thiscode is distributed in the hope that it will be useful, but
WITHOUTANY WARRANTY. ALLWARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
DISCLAIMED. This includes but is not limited towarranties of
MERCHANTABILITYor FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifndef __INTTYPES_H_
#define __INTTYPES_H_
/* Use [u]intN_t if you need exactly N bits.
XXX- doesn't handle the -mint8 option. */
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef int int16_t;
typedef unsigned int uint16_t;
typedef long int32_t;
typedef unsigned long uint32_t;
typedef long long int64_t;
typedef unsigned long long uint64_t;
typedef int16_t intptr_t;
typedef uint16_t uintptr_t;
#endif
C99標準另一個檔案/usr/include/stdint.h
內如下:
/*在C99標準中定義了這些資料型別,
具體定義在:/usr/include/stdint.h
參考:https://blog.csdn.net/Mary19920410/article/details/71518130?locationNum=4&fps=1*/
#ifndef __int8_t_defined
#define __int8_t_defined
typedef signed char int8_t;
typedef short int int16_t;
typedef int int32_t;
# if __WORDSIZE == 64
typedef long int int64_t;
# else
__extension__
typedef long long int int64_t;
# endif
#endif
typedef unsigned char uint8_t;
typedef unsigned short int uint16_t;
#ifndef __uint32_t_defined
typedef unsigned int uint32_t;
# define __uint32_t_defined
#endif
#if __WORDSIZE == 64
typedef unsigned long int uint64_t;
#else
__extension__
typedef unsigned long long int uint64_t;
#endif
相關文章
- uint8_t、uint16_t、uint32_t、uint64_tUI
- with u
- 固態u盤和普通u盤哪個好 固態u盤和普通u盤的區別
- 車載U盤和普通U盤哪個好 車載U盤和普通U盤的區別
- grep: PCRE does not support L, l, N{name}, U, or u
- VMwareWorkstation設定U盤啟動(或U盤使用)
- 1U、2U、3U伺服器機櫃的尺寸知識大全伺服器
- 閃迪U3利用工具U3-Pwn
- Java 7u7和6u35釋出Java
- i5-8250U和R5-2500U區別對比 i5-8250U和R5-2500U哪個好
- u3d3D
- 9.18u
- 銳龍5-2500U和i5-8250U區別對比 R5-2500U和i5-8250U哪個好?
- u-picker和u-datetime-picker顯示問題
- R5-2500U和R7-2700U區別對比 AMD R7 2700U和R5 2500U哪個好?
- J.U.C - AQSAQS
- 反彙編命令U
- Happy Birthday to U !APP
- u-datetime-picker
- 如何對U盤檔案資料加密,U盤加密方法教程分享加密
- HTC U12+體驗評測 HTC U12+怎麼樣?
- 魅藍U20值得買嗎 魅藍U20評測
- win10如何禁止使用u盤_win10怎麼禁用u盤Win10
- u盤3.0和2.0哪個好 u盤3.0和2.0的區別
- 5. U-Boot移植boot
- U盤做系統教程
- U3D角色動畫3D動畫
- u盤破解WiFi密碼WiFi密碼
- Wii Party U 遊戲簡介遊戲
- 48.Linux-普通U盤以及多分割槽U盤自動掛載Linux
- 移動U盤怎麼設定密碼 U盤加密最簡單方法密碼加密
- 不用U盤怎麼重灌系統 無u盤電腦重灌系統教程
- 有效防止u盤洩密的方法,u盤防洩密軟體推薦
- u盤傳輸速度慢怎麼解決 u盤複製很慢的原因
- u盤東西誤刪怎麼恢復 恢復u盤檔案的方法
- 【知識分享】1U和2U的伺服器怎麼選擇伺服器
- HTC預熱新品釋出會:主角是U11 Plus和U11 Life
- JDK 7u9和6u37釋出,修復重要安全漏洞JDK