Fixed width integer types (int8) in C++

If I ask you, "What is the size of an integer in C++?, what would be your answer?

4 bytes?2 bytes?8 bytes?
Well, here's the thing, it may be a slight oversimplification to keep it this way but C++ doesn't have a fixed size for integers.
What C++ does have is a lower limit for integer size.
C++ guarantees that signed short, unsigned short, signed int, and unsigned int are at least 16 bits or 2 bytes.But, why isn't the size fixed?

Well, the reason goes back to 1969-1973 when C was being devel...

 •  0 comments  •  flag
Share on Twitter
Published on May 31, 2021 12:25
No comments have been added yet.