C++ - 哪些是可变的" Uint "?

C++ - Which are variable by " Uint "?

本文关键字:Uint C++      更新时间:2023-10-16

哪些是由"Uint"变量的?就是有" Uint8","Uint16"等...

但是它们是什么?

现在我有一些时间使用 C++但我从来不需要使用这些变量并引起我的好奇心。

提前谢谢。

uint不是

标准类型。在某些系统上,uint typedef

typedef unsigned int uint ;

uint不是标准中提到的基本数据类型。有时,为了使变量在平台上具有恒定的大小[以实现可移植性],会使用一些typedef

您可以查看 cstdint 标头以获取更多信息。

根据最佳假设,uint应该是要uint32_t的类型定义

typedef uint32_t uint;
typedef unsigned char  uint8_t;
typedef unsigned short uint16_t;
typedef unsigned long  uint32_t;
typedef signed   char  int8_t;
typedef signed   short int16_t;
typedef signed   long  int32_t;
It can help you..

如果你正在处理基于其大小的变量,那么你可以像这样声明它