[prog] C programming - capturing information sent to stdout
Sue Stones
suzo at spin.net.au
Tue Jul 12 22:25:48 EST 2005
Sue Stones wrote:
> I am trying to work out how to capture data sent to stdout for use
> elsewhere in the program.
>
> Using libcurl I query a webpage, HTML code is returned and sent to
> stdout. But I need to somehow capture this output and processes it to
> retrieve the data that I need. What is the best way to do this? So
> far I haven't found anything that works, but its some years since I
> did any C programming and I am a little rusty. Any help would be most
> useful.
I seem to have found the solution: a combination of freopen() and fork.
sue
More information about the Programming
mailing list