编程语言中的char-int等价

时间:2017-01-25 00:48:48

标签: java c++ c character-encoding

在Java,C或C ++等许多语言中,char可以轻松转换为int。例如,char 'A'int 65,依此类推。这是什么编码?

1 个答案:

答案 0 :(得分:1)

char和int之间的区别(除了它们的大小不同)是 它们是如何用特定语言处理的。

值得阅读有关字符编码的主题: the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses

相关问题