C++ language documentation - Data Type Ranges
C++ language documentation - Data Type Ranges
https://docs.microsoft.com/en-us/
https://docs.microsoft.com/zh-cn/
Microsoft documentation - Technical documentation
https://docs.microsoft.com/en-us/documentation/
https://docs.microsoft.com/zh-cn/documentation/
Microsoft C++, C, and Assembler documentation
https://docs.microsoft.com/en-us/cpp/
https://docs.microsoft.com/zh-cn/cpp/
1. Languages and frameworks
2. C++ language documentation
https://docs.microsoft.com/en-us/cpp/cpp/
https://docs.microsoft.com/zh-cn/cpp/cpp/
3. Data Type Ranges
https://docs.microsoft.com/en-us/cpp/cpp/data-type-ranges
https://docs.microsoft.com/zh-cn/cpp/cpp/data-type-ranges
Docs -> Microsoft C++, C, and Assembler C++ language -> C++ language reference -> Built-in types -> Data type ranges
The Microsoft C++ 32-bit and 64-bit compilers recognize the types in the table later in this article.
Microsoft C++ 32 位和 64 位编译器可识别本文后面的表中的类型。
int
(unsigned int
)__int8
(unsigned __int8
)__int16
(unsigned __int16
)__int32
(unsigned __int32
)__int64
(unsigned __int64
)short
(unsigned short
)long
(unsigned long
)long long
(unsigned long long
)
If its name begins with two underscores (__
), a data type is non-standard.
如果其名称以两个下划线 (__
) 开始,则数据类型是非标准的。
The ranges that are specified in the following table are inclusive-inclusive
.
下表中指定的范围均包含起始值和结束值。
Depending on how it’s used, a variable of __wchar_t
designates either a wide-character type or multibyte-character type. Use the L
prefix before a character or string constant to designate the wide-character-type constant.
根据使用方式,变量 __wchar_t
指定宽字符类型或多字节字符类型。在字符或字符串常量之前使用 L
前缀来指定宽字符类型的常量。
signed
and unsigned
are modifiers that you can use with any integral type except bool
. Note that char
, signed char
, and unsigned char
are three distinct types for the purposes of mechanisms like overloading and templates.signed
and unsigned
是可以与除 bool
以外的任何整数类型一起使用的修饰符。请注意,就重载和模板等机制而言,char
, signed char
, and unsigned char
是三种不同的类型。
The int
and unsigned int
types have a size of four bytes. However, portable code should not depend on the size of int
because the language standard allows this to be implementation-specific.int
and unsigned int
类型具有四个字节的大小。但是,可移植代码不应依赖于 int
的大小,因为语言标准允许它是特定于实现的。
C/C++ in Visual Studio also supports sized integer types. For more information, see __int8
, __int16
, __int32
, __int64
and Integer Limits.
Visual Studio 中的 C/C++ 还支持按大小分类的整型。有关详细信息,请参阅 __int8
, __int16
, __int32
, __int64
和整数限制。
For more information about the restrictions of the sizes of each type, see Built-in types.
有关每种类型的大小限制的详细信息,请参阅内置类型。
The range of enumerated types varies depending on the language context and specified compiler flags. For more information, see C Enumeration Declarations and Enumerations.
枚举类型的范围因语言上下文和指定的编译器标志而异。有关详细信息,请参阅 C 枚举声明和枚举。
还没有评论,来说两句吧...