3 ms·
I have found a mistake: In table 9.1 of chapter 9 "Data types and Conversion" you wrote that the char data type ranges from -128 to 127, but that's not true, be
by bruno2 13y ago
I have found a mistake: In table 9.1 of chapter 9 "Data types and Conversion" you wrote that the char data type ranges from -128 to 127, but that's not true, because the standard doesn't say that a char is signed or unsigned, it depends on the implementation. A char can be an unsigned char and in that case it will range from 0 to 255.
- cordite 13y agoThanks, I'll add it to the tracker.
- Someone 13y agoA char also isn't guaranteed to be 8 bits. POSIX requires it, but in ISO C++, a char can be as large as a long long int (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3337.pdf http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n333..., section 3.9.1, paragraph 2)