C++中的类型unsigned
指的是什么?和 完全一样unsigned int
吗?
[符合质量标准]
是的,完全一样。有关类型说明符和相应指定类型的列表,请参见7.1.6.2 简单类型说明符 [dcl.type.simple]中的表 10。unsigned
指定类型“unsigned int”,就像unsigned int
指定类型“unsigned int”一样。
Specifier(s) Type
_type-name_ the type named
_simple-template-id_ the type as defined in 14.2
char “char”
unsigned char “unsigned char”
signed char “signed char”
char16_t “char16_t”
char32_t “char32_t”
bool “bool”
unsigned “unsigned int” <<<<<<<<<<<<<
unsigned int “unsigned int”
signed “int”
signed int “int”
int “int”
unsigned short int “unsigned short int”
unsigned short “unsigned short int”
unsigned long int “unsigned long int”
unsigned long “unsigned long int”
unsigned long long int “unsigned long long int”
unsigned long long “unsigned long long int”
signed long int “long int”
signed long “long int”
signed long long int “long long int”
signed long long “long long int”
long long int “long long int”
long long “long long int”
long int “long int”
long “long int”
signed short int “short int”
signed short “short int”
short int “short int”
short “short int”
wchar_t “wchar_t”
float “float”
double “double”
long double “long double”
void “void”
auto placeholder for a type to be deduced
decltype(_expression_) the type as defined below
是的,它是一样的。