繁体   English   中英

为什么可以找到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的新功能。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM