标签: c
我有一个char x,我希望将x的8位二进制数转换为整数。
char x
我尝试使用int y=(int)x,但它无法正常工作。
int y=(int)x
有人知道如何解决这个问题吗?
答案 0 :(得分:2)
这是你需要的吗
int y = 'x';