The get member function with no arguments inputs one character from the designated stream (including white-space characters and other nongraphic characters, such as the key sequence that represents end-of-file) and returns it as the value of the function call. This version of
EOF when end-of-file is encountered on the stream.
Figure 13.4 demonstrates the use of member functions
get on input stream
cin and member function
put on output stream
cout. Recall from Chapter 5 that
EOF is represented as an
int. This program reads characters into the
character, so that we can test each character entered to see if it’s
EOF. The program first ...