关于uint8_t、uint_least8_t、uiuint_fast8_t等说明

版权声明:本文为博主原创文章,欢迎交流学习 https://blog.csdn.net/u012081284/article/details/83011982

 在vs2017的编译器里,可以直接识别

int8_t、int16_t、int32_t、int64_t、uint8_t、uint16_t、uint32_t、uint64_t

int_least8_t、int_least16_t、int_least32_t、int_least64_t、uint_least8_t、uint_least16_t、uint_least32_t、uint_least64_t

int_fast8_t、int_fast16_t、int_fast32_t、int_fast64_t、uint_fast8_t、uint_fast16_t、uint_fast32_t、uint_fast64_t;

intmax_t、uintmax_t等。可以看到这些是定义在stdint.h里面的,这里把他摘抄出来,方便低版本编译器对照使用

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;

typedef signed char        int_least8_t;
typedef short              int_least16_t;
typedef int                int_least32_t;
typedef long long          int_least64_t;
typedef unsigned char      uint_least8_t;
typedef unsigned short     uint_least16_t;
typedef unsigned int       uint_least32_t;
typedef unsigned long long uint_least64_t;

typedef signed char        int_fast8_t;
typedef int                int_fast16_t;
typedef int                int_fast32_t;
typedef long long          int_fast64_t;
typedef unsigned char      uint_fast8_t;
typedef unsigned int       uint_fast16_t;
typedef unsigned int       uint_fast32_t;
typedef unsigned long long uint_fast64_t;

typedef long long          intmax_t;
typedef unsigned long long uintmax_t;

猜你喜欢

转载自blog.csdn.net/u012081284/article/details/83011982