C语言unsigned char、char与int之间的转换
2016年10月23日 18:40:50 bladeandmaster88 阅读数:11347更多
个人分类: c语言基础
先来看一道题:
char c1 =-1;
cout<< (int)c1 << endl;
输出为:-1
unsigned char c2 = -1;
cout << (
int)c2 << endl;
输出为:255
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)