Re: Output Redirection


[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]

Posted by Juan Romero Jr. on April 19, 2001 at 15:43:24:

In Reply to: Re: Output Redirection posted by Chris Stillwell on April 19, 2001 at 12:01:05:

: : I know that the OS handles redirection into the output file and when we cout, that is supposed to get loged. Ive written the code to take arguments from the command line, so I can take the script filename, but when I cout anything, there isnt any redirection. Does anyone know how to do this?

: Write (or modify) your program so that it takes only one argument from the command line and you'll be fine.

: If you want to know why you'll be fine, look really closely at the specs where it says "Typically, the program will be invoked, using output redirection ..."

: See the little '>' between the script argument and the log argument? That'll automatically take anything that gets sent to standard out and put it into the file specified by the log argument.

Write or modify?? Does that mean I have to use something other than main(int argc, char* argv[]) ??




Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]