加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c – 为什么相同的类型不同?

发布时间:2020-12-16 10:29:07 所属栏目:百科 来源:网络整理
导读:为什么这个(char在我的实现上签名): cout的std :: is_same char,signed char :: value; 输出错误? 解决方法 这三种类型在不同时间引入. 来自C99理性: Three types of char are specified: signed ,plain,and unsigned . A plain char may be represented
为什么这个(char在我的实现上签名):

cout<<的std :: is_same< char,signed char> :: value;

输出错误?

解决方法

这三种类型在不同时间引入.

来自C99理性:

Three types of char are specified:
signed,plain,and unsigned. A plain char may be represented as either signed or unsigned
depending upon the implementation,as in prior practice. The type signed char was
introduced in C89 to make available a one-byte signed integer type on those systems which
implement plain char as unsigned char.

它们必须在C中保持不同的类型,以允许char上的重载是可移植的.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读