มาตรฐาน C++ ไม่กำหนดขนาดเป็นไบต์ ของ integral types กำหนดแค่ minimum range ที่ต้องรองรับ
ขนาดในบิตคำนวณจาก minimum range ได้
ขนาดที่พบบ่อยในปฏิบัติ (de facto standards)
- 32-bit systems (ILP32): int, long, pointer = 32-bit (4 bytes)
- 64-bit Unix/Linux (LP64): long, pointer = 64-bit (8 bytes), int = 32-bit (4 bytes)
- 64-bit Windows (LLP64): long long, pointer = 64-bit, long, int = 32-bit
สรุป: อย่าสมมติขนาด ใช้ sizeof(int), sizeof(long) หรือ fixed-width types จาก <cstdint> (int32_t, int64_t ฯลฯ)