Size of int in C on different architectures

前端 未结 7 1816
甜味超标
甜味超标 2020-12-09 20:31

I am aware that the specification of the C language does not dictate the exact size of each integer type (e.g., int).

What I am wondering is: Is there a

7条回答
  •  旧巷少年郎
    2020-12-09 20:55

    Unless you check for each platform with #ifdef or so, I doubt it's easily possible. But many libraries already do that task for you. For MSVC it's __int8, __int16, &c. The GTK library has similar typedefs.

提交回复
热议问题