为什么可以找到stdint.h,但cstdint不能
Why do stdint.h can be found but cstdint not?
我很惊讶包括stdint.h作品,但不包括cstdint。
$ aCC sizeof.cpp
"sizeof.cpp", line 5: error #2005-D: could not open source file "cstdint"
#include <cstdint>
^
1 error detected in the compilation of "sizeof.cpp".
$ aCC --version
aCC: HP C/aC++ B3910B A.06.12 [Nov 03 2006]
这与 g++ 相同:
$ g++ --version
g++ (GCC) 4.2.3
请问为什么?而且,除了更新编译器之外,有什么方法可以解决此问题吗?谢谢。
您的编译器支持没有<cstdint>
的旧C++标准(因为 C90 没有<stdint.h>
)。 <cstdint>
是 C++11 的新功能。
相关文章:
- C++我的数学有什么问题,为什么我的代码不能正确循环
- 为什么在没有显式默认构造函数的情况下,将另一个结构封装在联合中作为成员的结构不能编译
- 为什么我的for循环不能正确获取argv
- 不能在初始值设定项列表中将非常量表达式从类型 'int' 缩小到'unsigned long long'
- 为什么我不能在 FOR LOOP 中使用 i/10,C++?
- 为什么我不能在不创建字符串变量的情况下使用函数的字符串输出
- 为什么模板类中的对象不能返回值
- 为什么我不能在一个类的不同行中声明和定义成员变量?
- 为什么我不能在 C++ 中的特定函数重载中调用同一函数的任何其他重载?
- ld:bind_at_load和-bitcode_bundle(Xcode设置ENABLE_bitcode=YES)不能
- 数组长度,为什么从命令行获取时不能使用它?
- Windows/Cygwin - 不能使用 pybind11 - 犯错误
- 为什么我不能使用 EGL 创建无头 OpenGl 上下文?
- 递归模板化函数不能分配给具有常量限定类型"const tt &"的变量"state"
- 为什么我不能将一个对象push_back到属于另一个类的对象向量中?
- 为什么我不能将 rand() 与数组的大小一起使用?
- 为什么虚函数不能是静态的和全局的?
- 为什么我不能在 while 循环中创建线程?
- 为什么这个音频包络不能通过开关的情况?
- 为什么可以找到stdint.h,但cstdint不能