// The putback function is predefined in iostream. Its // purpose is to replace one character at a time to the // input buffer. Your code will look like this: cin.putback(ch); // After execution of the above line, whatever character // was in ch is placed back onto the front end of the // input buffer, and will be the next character to be // read from it. // The putback function might be used with cin to strip // whitespace from the input buffer, like this: cin >> ch; cin.putback(ch); // Recall that the cin stream extraction operator (>>) // ignores tabs, spaces, and new lines, so the input buffer // might look like this before the above two lines are // executed: |' ' ' ' ' // spaces |' ' 'A' // new line and spaces // It will look like this after: 'A'