Here, rdbuf() yields the buffer of cin (see Section 15.12.2, page 820). Thus, the program
copies all standard input to standard output.
• By passing a pointer to a stream buffer to operator >>, you can read directly into a stream buffer.
For example, you could also copy all standard input to standard output in the following way