我对包括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
这是什么道理?而且,除了更新编译器之外,还有什么方法可以解决这个问题吗?谢谢。
发布于 2012-05-02 14:06:39
您的编译器支持没有<cstdint>
的旧C++标准(因为C90没有<stdint.h>
)。<cstdint>
是C++11的新特性。
https://stackoverflow.com/questions/10408458
复制相似问题