Howto execute a command in C if argv[1] is equal to -A
Hi,
I want to execute a command when the first argument of a C program I am writing, is equal to -A. Can someone show me how that can be done? I am starting with C and I am unable to achieve this myself. Thanks Ben |
maybe like this?
Code:
int main(int argc, const char *argv[]) |
Quote:
Regards, Ben |
Another function you might want to look into is popen(), if you're
familiar with file I/O it will be a breeze. |
Quote:
|
All times are GMT -5. The time now is 02:02 PM. |