Capturing stdout from a system() command optimally
Asked 2008-09-24T07:27:35.343
57
I'm trying to start an external application through system() - for example, system("ls"). I would like to capture its output as it happens so I can send it to another function for further processing. What's the best way to do that in C/C++?