C: Getting program's output
Is there any way, in C, to execute another program AND get it's output?
I need to run wc -c to get the number of chars in a file. Any ideas? |
Look at the popen() function.
|
Look into popen();.
Though a more portable way to do this would be: Code:
long filelen(char *fname){ |
You have fixed my problem, danke sehrs!
|
No problem. :) Just glad to help.
|
All times are GMT -5. The time now is 12:27 AM. |