Results 1 to 6 of 6
googled it and infoed it, didn't find anything on how to use them and get the values in the program...
- 04-06-2007 #1Just Joined!
- Join Date
- Feb 2007
- Posts
- 12
C: how to pass arguments using -l and s <num>
googled it and infoed it, didn't find anything on how to use them and get the values in the program
- 04-06-2007 #2
Reading arguments is done by looping through argv, or by using getopts()
- 04-06-2007 #3Just Joined!
- Join Date
- Feb 2007
- Posts
- 12
ok but what's the use of -l and -s here? why don't i just pass them as normal arguments if so?
- 04-06-2007 #4
I rly don't understand your question. Your argument list is referenced by a pointer to the first element of an array called argv. Are you talking about a specific program here?
- 04-06-2007 #5Just Joined!
- Join Date
- Feb 2007
- Posts
- 12
let's say i wana run this program ./simple-batch.e -l6 or ./simple-batch.e -s5
what do -l and -s do?
- 04-06-2007 #6
Whatever you want them to? Options aren't universal, the programmer of the application decides what options do what.


Reply With Quote