N
nvangogh
Hi, I am stuck on exercise 8.1 (at section 8.1.2) p314 of C++ Primer 5th
Edition (Lippman, Lajoie, Moo). The exercise says:
"Write a function that takes and returns an istream&. The function
should read the stream until it hits end-of-file. The function should
print what it reads to the standard output. Reset the stream so that it
is valid before returning the stream."
Suppose I have declared:
istream& read(istream&);
How do I go about defining this function?
Thanks in advance.
Edition (Lippman, Lajoie, Moo). The exercise says:
"Write a function that takes and returns an istream&. The function
should read the stream until it hits end-of-file. The function should
print what it reads to the standard output. Reset the stream so that it
is valid before returning the stream."
Suppose I have declared:
istream& read(istream&);
How do I go about defining this function?
Thanks in advance.