#include using namespace std; const char STOP_CHAR{'Q'}; int main() { char letter; // stream extraction cout << "Enter a letter => "; cin >> letter; cout << "The letter is '" << letter << "'" << endl; cout << endl; cout << "Enter some letters for get: "; letter = static_cast(cin.get()); while (letter != STOP_CHAR) { cout << "Got a '" << letter << "' which is ascii " << static_cast(letter) << endl; cin.get(letter); } cout << "Finished with '" << letter << "' which is ascii " << static_cast(letter) << endl; cout << endl; return 0; }