Re:The Rook's Guide to C++
by bruno2 on Wednesday November 27, 2013 @05:46AM
(#6807460)
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.
[ Parent
| on HN ]
Thanks, I'll add it to the tracker.
A 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/n333..., section 3.9.1, paragraph 2)