8

include 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

どういうことなんですか?そして、この問題を修正する方法はありますが、コンパイラを更新していますか? ありがとうございました。

4

1 に答える 1

8

あなたのコンパイラは、古い C++ 標準をサポートしていません<cstdint>(C90 にはありませんでした<stdint.h>)。<cstdint>は C++11 の新機能です。

于 2012-05-02T06:06:39.077 に答える