In C++11 we are provided with fixed-width integer types, such as std::int32_t and std::int64_t, which are defined in cstdint/cinttypes. However, int32_t and int64_t are also in stdint.h/inttypes.h. What are the reasons to use std::int64_t over int64_t? To me, the former involves more typing, even by using namespace std.
In C++, the "C library" headers of the form <foo.h> are deprecated, and headers <cfoo> should be used instead. (I put "C library" in quotes because that's just a name for this part of the C++ standard library. Everything we're talking about is part of the C++ standard library, nothing has actually to do with C.)
Whether you should use the non-deprecated headers depends on your personal attitude towards deprecation.
(The amount of physical typing the code author has to do is a very poor concern. Code is read and maintained far more than it is written. The latter are important concerns, the former mostly a distraction.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With