我知道C语言的规范并没有规定每个整数类型的确切大小(例如int).
int
我想知道的是:C(不是C++)中是否有一种方法来定义具有特定大小的整数类型,以确保它在不同的体系结构中是相同的?喜欢:
typedef int8 <an integer with 8 bits> typedef int16 <an integer with 16 bits>
或者任何其他允许程序的其他部分在不同体系结构上编译的方式.
c types integer cross-platform
c ×1
cross-platform ×1
integer ×1
types ×1