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?.
Printable View
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?.
If your command line looks likeThen, 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 writeCode:prg_one.exe | prg_two.exe
Or if your operating system is Unix, you might like to use tail -fCode:prg_one.exe >somefile.txt