The problem here is that input is a local variable. When you return it, you have a problem, because once control returns from the function, the stream object is destroyed, yet you are returning a...