Hands-On System Programming with C++
上QQ阅读APP看书,第一时间看更新

System Types for C and C++

With a system program, simple things, such as integer types, become complicated. This entire chapter is devoted toward common problems that arise when performing system programming, especially when performing system programming for multiple CPU architectures, operating systems, and user space/kernel communications, such as system calls. 

This chapter consists of the following topics:

  • An explanation of the default types that C and C++ provide, including types that most programmers are familiar with, such as char and int
  • A review of some of the standard integer types provided by stdint.h to address limitations with the default types
  • Structure packing and the complications associated with optimizations and type conversions