Posted by John Kugelman on April 14, 2001 at 14:46:21:
In Reply to: log? posted by Z on April 14, 2001 at 14:02:58:
I'm still not clear on the purpose of the log file in the command line arguments. All output is to cout, so what exactly is the purpose of the "ouput redirection" in the command line arguments?
If all output is done to cout it can be redirected to a file as shown in the specification. It's much easier to inspect the output if it's stored in a file than it is to read it on screen, especially when most of it will scroll off the screen.
Programming-wise it lets you drop your log output class (if you had one), which makes the program a bit simpler. I don't think I was the only person here who found it a pain in the neck to have to create and pass around a log class that was basically just a wrapper around ostream.
The program as specified takes one argument, the input file. The redirection is done by the O.S., so you'll never see the rest of the command line. Just write the program and output everything to cout; where the output ends up will be taken care of by the user.
Post a Followup