gpt4 book ai didi

c++ - "unsigned int"是否被视为一种数据类型?

转载 作者:行者123 更新时间:2023-11-30 18:40:02 25 4
gpt4 key购买 nike

如果我有:

unsigned int i;

unsigned int 本身是否被视为一种数据类型,就像 intfloat 是一种数据类型一样?或者我们只是说 int 是数据类型,而 unsigned 只是修改数据类型的工作方式?

最佳答案

C++ 标准 §3.9.1,第 2-3 段:(C 类似)

  1. There are five standard signed integer types : “signed char”, “short int”, “int”, “long int”, and “long long int”…
  2. 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com