commands stored into variables?
Hoi there!
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.. cheers, Benne |
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... Try: http://www.iota-six.co.uk/c/i1_file_...and_output.asp Bye Kess... |
The C function is system() - you should be able to call it from C++ also.
|
All times are GMT -5. The time now is 02:19 AM. |