commands stored into variables?
How do I let my program (c++) exucte a unix command (e.g. cat /proc/cpuinfo | grep "model name")? I need to collect some information about the computer it is running on, and play around with it..
I can imangine this will be very simple, as it seems to be..
C, C++, Java, etc... can work on files...
I dont remember the C++ function that open files but it's something like fopen().
You dont need to execute a command, work directly on the file...
The C function is system() - you should be able to call it from C++ also.
|All times are GMT -5. The time now is 09:20 PM.|