简体   繁体   中英

Why do stdint.h can be found but cstdint not?

I'm be suprised with that include stdint.h works but include cstdint not.

$ 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]

It's same with g++:

$ g++ --version
g++ (GCC) 4.2.3

May I ask why? And, have any method to fixed this problem but updating compiler? Thank you.

Your compiler supports the old C++ standard which has no <cstdint> (as C90 had no <stdint.h> ). <cstdint> is new to C++11.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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