Tuesday, October 26, 2010

stdout to a file in C

it is very Simple , I tried On AIX

FILE *fd1;
if( fd1 == NULL )
printf("Error in openng a file");
return -1;
printf("This is test message should go in /tmp/test.log file\n");
return 0;


What ever you print to stdout will go into a file. Pin It
Related Posts Plugin for WordPress, Blogger...