This kind of question is just fine. It gives us with less expertise a
chance to teach. 8^)
You can do two things. First, you can use shell redirection. For
instance:
program parameter 2>file
The "2>" tells the shell to create a file descriptor for "file" and
attach it to stderr of "program". The program doesn't need to know
anything about this.
The second way is to close file descriptor 2, and re-open another
file/device with that number within your program.
[EMAIL PROTECTED] wrote:
>
> Hello, I'm a beginning C/programmer and i have a (rather basic i guess)
> question. The output of stderr is standard the screen. Can I redirect this
> at for example a file ?
>
> PS: Would you guys would be insulted (or bored) if I ask such basic
> questions a few times (too many). Like I said, I'm a beginner :-)
>
> De Messemaeker Johan
> HEMMIS n.v.
> Koning LeopoldIII-laan 2, 8500 Kortrijk
> Tel.: 32 (0)56/37.26.37
> Fax: 32 (0)56/37.23.24
> Current Project : VMM Aalst