December 3rd, 2009, 05:51 AM
redirect to file
I have a console application that when runs i like to capture its console output and send to a file. any line as console gets updated should get appended to file. Any sample code or piece of working code?.
December 3rd, 2009, 09:30 AM
Re: redirect to file
If your command line looks like
Then, in prg_two.exe, you can read output data from prg_one.exe, with statements about files (fopen, fread, fclose if you progream in C), but with stdin instead of the name of a file when you open your file. But it more simple to write
prg_one.exe | prg_two.exe
Or if your operating system is Unix, you might like to use tail -f
Last edited by olivthill2; December 3rd, 2009 at 09:33 AM.
Click Here to Expand Forum to Full Width