Hi,
What im trying to do is:
Put the output of a system command (eg: ls) into a variable in C++.
ATM, what im doing is putting the output of the system command into a file, then reading from it.
>> system("ls > blah.dat"
;
Is there a way to put the output into a variable??
eg: >> system("ls > <variable>"
;
I am wanting to do this with child/ren processes, so does that mean the variable should always be different to avoid being writted over by different processes??
thanks in advance,
-evosix-
What im trying to do is:
Put the output of a system command (eg: ls) into a variable in C++.
ATM, what im doing is putting the output of the system command into a file, then reading from it.
>> system("ls > blah.dat"
Is there a way to put the output into a variable??
eg: >> system("ls > <variable>"
I am wanting to do this with child/ren processes, so does that mean the variable should always be different to avoid being writted over by different processes??
thanks in advance,
-evosix-