I haven't worked with streams in years, so I don't recall how to do this. I would like to be able to print data to either the screen or to a file. Is there a way I can write one print function that takes the data to be printed, and sends it to the proper location (based on a flag, let's say)? The answer is probably blindingly obvious, but it's Friday and I'm tired. 