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

I will be surprised that include stdint.h works, but does not contain 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] 

Same thing with g ++:

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

May I ask why? And, is there any method to fix this problem, but updating the compiler? Thanks.

+6
source share
1 answer

Your compiler supports the old C ++ standard, which does not have <cstdint> (since C90 does not have <stdint.h> ). <cstdint> is new to C ++ 11.

+5
source

Source: https://habr.com/ru/post/914697/


All Articles