fixed length data types in C/C++

后端 未结 11 970
春和景丽
春和景丽 2020-12-23 14:34

I\'ve heard that size of data types such as int may vary across platforms.

My first question is: can someone bring some example, what goes wrong, when p

11条回答
  •  生来不讨喜
    2020-12-23 14:51

    1. If a type is smaller than you think then it may not be able to store a value you need to store in it.
    2. To create a fixed size types you read the documentation for platforms to be supported and then define typedefs based on #ifdef for the specific platforms.

提交回复
热议问题