文字コード
#includeusing namespace std; void ShowCode(char ch) { cout << "[" << ch << "]に振られた番号は" << (int)(unsigned char)ch << "です。" << endl; cout << 'ch' << endl; //25448 cout << 'c' << endl; //c cout << 'h' << endl; //h cout << 'da' << endl; //100000001100001 == 25697 //つまり、[10000000][11000001]==[c][h]のこと。連結している。 } int main() { ShowCode('0'); //48 ShowCode('A'); //65 ShowCode('a'); //97 ShowCode('c'); //99 ShowCode('h'); //104 }