I was reading the C++ FAQ and it says
The C++ language guarantees a byte must always have at least 8 bits
So what does that mean for
C++ (and C as well) defines intX_t
(i.e. the exact width integer types) typedefs as optional. So, it just won't be there if there is no addressable unit that's exactly 8-bit wide.
If you want an array of bytes, you should use char
, as sizeof char
(and signed char
and unsigned char
) is well-defined to always be 1 byte.