I want to get the output of this command for example :
system("dir C:\");
or of :
QProcess::execute("cmd /c dir C:\");
How to do that ?
Thanks !
I want to get the output of this command for example :
system("dir C:\");
or of :
QProcess::execute("cmd /c dir C:\");
How to do that ?
Thanks !
You can modify the standard output path to be a pipe which you read from, but it would be easier to use
popen()
instead ofsystem()
.Since you appear to be using Windows, you would use
_popen()
.