如果我有:
unsigned int i;
unsigned int
本身是否被视为一种数据类型,就像 int
或 float
是一种数据类型一样?或者我们只是说 int
是数据类型,而 unsigned
只是修改数据类型的工作方式?
最佳答案
C++ 标准 §3.9.1,第 2-3 段:(C 类似)
- There are five standard signed integer types : “signed char”, “short int”, “int”, “long int”, and “long long int”…
- For each of the standard signed integer types, there exists a corresponding (but different) standard unsigned integer type: “unsigned char”, “unsigned short int”, “unsigned int”, “unsigned long int”, and “unsigned long long int”…
关于c++ - "unsigned int"是否被视为一种数据类型?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27465728/