PDA

View Full Version : Who to redirect stdout to a file in C



edugarcia
09-29-2004, 12:49 PM
Hi,

I want to know how can I redirect stdout to a file/socket in C.

Thanks in advance

Salem
09-29-2004, 01:25 PM
Read the manual pages for
close()
dup()

linuxdude
09-29-2004, 09:33 PM
./program > file.txt:)

tjohnsson
10-01-2004, 12:18 AM
freopen( ... )