-8

C ++の型unsignedは何を指しますか?まったく同じunsigned intですか?

【品質基準を満たす】

4

2 に答える 2

4

はい、まったく同じです。タイプ指定子と対応する指定されたタイプのリストについては、7.1.6.2単純タイプ指定子[dcl.type.simple]の表10を参照してください。unsignedタイプ「unsignedint」を指定するのと同じようにunsigned int、タイプ「unsignedint」を指定します。

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
于 2012-11-08T21:40:02.823 に答える
2

はい、同じです。

参照:http ://en.cppreference.com/w/cpp/language/types

于 2012-11-08T21:40:51.763 に答える