c++ - 声明 C++ 中的类型太多

标签 c++ variables modifiers

unsigned/signed long int a; 是可能的 为什么 unsigned/signed long float/double a; 是不可能的?

为什么我会得到 too many types in declaration 后者的错误而不是前者的错误?

最佳答案

共有三种浮点类型:floatdoublelong double。这些都没有 unsigned 等价物,因此将 signedunsigned 放在它们前面是无效的。没有 long float 这样的类型。

关于c++ - 声明 C++ 中的类型太多,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31098076/

相关文章:

c++ - CONCEPT_REQUIRES_ ranges-v3 中的实现

c++ - 并发数据结构设计

c++ - 将 Boost 智能指针传递给线程函数

vb.net - 将数学运算符分配给变量 - VB

swift - 使用 "open"和 "public"

c++ - 在 Visual C++ 中设置修饰符 "public: static"

c++ - 如何将 Qt 内置枚举公开给 QML?

linux - 学习 Bash - 如何正确声明和打印/嵌入变量?

variables - 如何在 Powershell 中手动增加 $err 计数?

.net - 为什么Winforms中的修饰符设置为Friend?