Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>> 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`).



To 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`.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: