// chartype.cpp -- the char type
#include <iostream>
int main()
{
using namespace std;
char ch;
cout << "Enter a character: " << endl;
cin >> ch;
cout << "Hola!! ";
cout << "Thank you for the " << ch << " character." << endl;
return 0;
}
输出:
Enter a character:
M
Hola!! Thank you for the M character.