Path: utzoo!news-server.csri.toronto.edu!torsqnt!geac!maccs!walkerd From: walkerd@maccs.dcss.mcmaster.ca (David Walker) Newsgroups: comp.lang.c++ Subject: Assigning cout in Turbo C++ Message-ID: <27DEC60D.18984@maccs.dcss.mcmaster.ca> Date: 14 Mar 91 00:38:36 GMT Organization: McMaster University, Hamilton, Ontario, Canada. Lines: 19 Summary : Can you reassign cout to a file? Expires: Sender: walkerd@maccs.mcmaster.ca Followup-To: Distribution: comp.lang.c++ Organization: McMaster University, Hamilton, Ontario, Canada Keywords: I have not been reading this newsgroup lately, so please forgive me if this has already come up : I am trying to reassign cout to a file in Turbo C++ 2.0, but I can't even determine if it is possible. I know that this is possible using stdout; it is the example of freopen on page 172 of the Reference Guide. I would like to do the same thing with cout, and since I have a LOT of code using cout, it would be a real pain to go back and use stdout. Borland's tech support think that this can be done, but can't tell me how to do it. All I want to do is reassign cout to a file so that all screen output becomes file output. If anyone can tellme how to do this, I will be very grateful! Dave Walker