Size of int in C on different architectures
- by NawaMan
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 way in C (not C++) to define an integer type with a specific size that ensures it will be the same across different architectures? Like:
typedef int8 <an integer with 8 bits>
typedef int16 <an integer with 16 bits>
Or any other way that will allow other parts of the program to be compiled on different architecture.