Quote:Original post by JohnBSmall
Quote:Original post by SiCrane
None. char is defined to be one byte.
Odd... I wonder why they didn't just call it 'byte' then.
John B
Backwards compatibility with C.
Back in C days, people did a lot of bad stuff with regards to text handling (in particular, assuming it's ok to represent each character of a string in one byte, and then put a special byte at the end and set a pointer to the beginning) - 'char' and 'byte' became synonymous. In C++, sizeof(char) == 1, i.e. the char size is defined to be one byte, but a byte is *not* guaranteed to be 8 bits (it is, however, guaranteed to be *at least* that much, and also that memory consists of contiguous bytes with no holes in between) - to unambiguously refer to 8 bits in technical discussion, use 'octet'.