//----------------------------------------------------------------------------- // play with get() which gets one character //----------------------------------------------------------------------------- //#include // possibly need with MS Visual C++ #include using namespace std; int main(){ char ch; // single input character cout << "Enter as many characters as you'd like, (although I will only keep" << endl << "the first non-blank char) ==> "; cin >> ch; cout << endl << "Your character is: " << ch << endl << endl; // skip over (read and ignore) other characters until end-of-line, // don't really need ch variable here while ((ch = cin.get()) != '\n'); // if you want to pause temporarily during your program cout << "And now for something else ... " << endl; cout << "Press Enter to continue ... "; while (cin.get() != '\n'); cout << endl << "continue processing ..." << endl << endl; return 0; }