- Hands-On System Programming with C++
- Dr. Rian Quinn
- 149字
- 2021-07-02 14:42:37
Summary
In this chapter, we reviewed the different integer types (and briefly reviewed the floating point types) that are provided by C and C++ for system programming. We started with a discussion on the default types provided by C and C++ and the pros and cons associated with these types, including the common int type, explaining what it is, and how it is used. Next, we discussed the standard integer types provided by stdint.h and how they address some of the issues with the default types. Finally, we concluded this chapter with a discussion on structure packing and the issues associated with type conversions and optimizations that the compiler can make in different scenarios.
In the next chapter, we will cover changes made by C++17, a C++ specific technique called Resource Acquisition Is Initialization (RAII) and provide an overview of the Guideline Support Library (GSL).