// FILE: charline.cc //PURPOSE: To show how to input a line of characters one character at a time // and what you get as a result. #include // required for EXIT_FAILURE etc #include // required for external file streams int main() //Pre: Waits for user to input a single line of text and then // Post: A line of cin is written to cout as integers. // The last character processed from cin is ; // the last character written to cout is code for . { // Local data ... const char nwln = '\n'; // newline character char next_ch; // inout: character buffer // Copy all data characters from cin file stream to cout file stream. cin.get (next_ch); //See chapter 8. while ( (next_ch != nwln) && !cin.eof ()) { cout <