4 ms·
>> Character literals (in single quotes) have the type (signed) int in C, but (signed or unsigned) char in C++. > That's not correct. In C++, the type of a cha
by dataflow 6y ago
>> Character literals (in single quotes) have the type (signed) int in C, but (signed or unsigned) char in C++.
> That's not correct. In C++, the type of a character literal is simply char, never signed char nor unsigned char.
I'd assume the author meant (signed `char` | unsigned `char`) rather than (`signed char` | `unsigned char`).
- nayuki 6y agoTo put it better, I meant to write that C++ character literals have type `char`, which in turn maps to either `signed char` or `unsigned char`.