How do you print an istream variable to standard out. [EDIT] I am trying to debug a scenario wherein I need to ouput an istream to a log file
You need to read from it, and then output what you read:
istream stm; string str; stm >> str; cout << str;