uint8_t、uint16_t、uint32_t、uint64_t

stitch389發表於2020-11-12
  • 它們都是用 typedef 定義的資料型別,它包含在標頭檔案<stdint.h>中。
  • 對整型而言:
  • uint8_t為1位元組
  • uint16_t為2位元組
  • uint32_t為4位元組
  • uint64_t為8位元組

具體定義為:

typedef signed char int8_t;
typedef short int16_t;
typedef int int32_t;
typedef long long int64_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;