not sure how to seperate them on the command line? i thought using quotes but doesn't work?
not sure how to seperate them on the command line? i thought using quotes but doesn't work?
by whitespace
Doesn't work how? Of course it works, depending on your shell of course.
Code:zac@neux:~ (0) $ cat args.c #include <stdio.h> int main(int argc, char * argv[]) { int i = 0; for(i = 0; i < argc; i++) { printf("Argument %d: %s\n", i, argv[i]); } return 0; } zac@neux:~ (0) $ gcc args.c -o args zac@neux:~ (0) $ ./args "this is the first 'argument'" "and then the second" Argument 0: ./args Argument 1: this is the first 'argument' Argument 2: and then the second
Last edited by zacs7; 08-23-2009 at 06:41 PM.