//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
//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