(This answered the first version of this question, which had a cout << stream << endl;
statement.)
You're printing an istream *
.
I suppose you would like to read from that istream
and print what you read, e.g. with
string s;
while (getline(*stream, s))
cout << s << endl;