阅读背景:

Why is 'char' signed by default in C++?

来源:互联网 

Why is char by default in the range from -128 to 127 when it is supposed to represent a 'character' whose textual reprezentations are in the range from 0 to 255? In this sense I'd guess char should be unsigned by default, only if we intended to treat it only like 'numbers' we'd have to add 'signed' keyword. Therefore should I rather use unsigned char when I work with text files?Why is char by default in the range from -128 t




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: