[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
- +U
- u
- 車載U盤和普通U盤哪個好 車載U盤和普通U盤的區別
- 固態u盤和普通u盤哪個好 固態u盤和普通u盤的區別
- grep: PCRE does not support L, l, N{name}, U, or u
- git push -u 中的u是什麼意思Git
- 迅雷U享
- 9.18u
- U盤量產之更改U盤容量大小
- 1U、2U、3U伺服器機櫃的尺寸知識大全伺服器
- u-picker和u-datetime-picker顯示問題
- i5-8250U和R5-2500U區別對比 i5-8250U和R5-2500U哪個好
- u-datetime-picker
- 銳龍5-2500U和i5-8250U區別對比 R5-2500U和i5-8250U哪個好?
- R5-2500U和R7-2700U區別對比 AMD R7 2700U和R5 2500U哪個好?
- J.U.C - AQSAQS
- 反彙編命令U
- HTC U12+體驗評測 HTC U12+怎麼樣?
- R7 5700U和R7 4700U 效能差距
- 如何對U盤檔案資料加密,U盤加密方法教程分享加密
- tarjan演算法 更新方式;探討low[u]=min(low[u],low[v]);和low[u]=min(low[u],dfn[v]) 寫得都對 https://www.acwing.com/blog/content/6015/演算法HTTP
- 48.Linux-普通U盤以及多分割槽U盤自動掛載Linux
- win10如何禁止使用u盤_win10怎麼禁用u盤Win10
- u盤3.0和2.0哪個好 u盤3.0和2.0的區別
- [20210331]sql_id=459f3z9u4fb3u.txtSQL
- U盤做系統教程
- 5. U-Boot移植boot
- linux gadget u盤(Mass storage)Linux
- 兒童與意義u
- 清除U盤內所佔的隱藏空間(U盤容量突然變小了)
- 有效防止u盤洩密的方法,u盤防洩密軟體推薦
- AMD 5700U 跑分出爐,相比 4800U 整體強 30-35%
- 移動U盤怎麼設定密碼 U盤加密最簡單方法密碼加密
- 不用U盤怎麼重灌系統 無u盤電腦重灌系統教程
- 在U盤下安裝ubuntu20.04,從U盤啟動Linux系統UbuntuLinux
- u盤東西誤刪怎麼恢復 恢復u盤檔案的方法
- u盤傳輸速度慢怎麼解決 u盤複製很慢的原因