您的位置:首页 > 其它

输入一个字符常量,输出此字符常量对应的整数值。

2010-10-17 18:07 323 查看
//File Name:Test.cpp
#include <iostream>
using namespace std;
int main()
{
char c;
cout<<”Input a char :”<< endl;
cin>> c;
cout<<”The value of  ”<< c <<int (c)<<endl;
}
编译:g++ –o  test Test.cpp
运行:./test
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐