C++ 中 unsigned 和 unsigned int 的区别
unsigned
和 unsigned int
之间有什么区别?
这个问题已经针对 C 得到了回答(没有区别):
Difference Between C 中的 unsigned 和 unsigned int
我有兴趣知道 C++ 中是否有任何实际差异。他们是同一类型吗?
What is the difference between unsigned
and unsigned int
?
This question was already answered for C (there is no difference):
Difference between unsigned and unsigned int in C
I am interested in knowing whether there is any practical difference in C++. Are they the same type?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它们是相同的类型,就像 C 中一样。没有任何区别。
当然,
unsigned
可以用作其他整型类型的限定符。但默认情况下,unsigned
与unsigned int
相同。They are the same type, as in C. No differences at all.
Of course,
unsigned
can be used as a qualifier for other integral types. But by default,unsigned
is the same asunsigned int
.