Is it possible to accept objects like cin,cout and the objects of ifstream fstream(file buffers) as arguments and then doing operations on them? If yes, please tell how.
Have you tried calling without a reference?
I can't test this myself right now, but something tells me std::cout and family aren't copyable. Besides that, operator<< changes the stream, and I don't know what may happen if those changes were allowed to be "lost".