argc and argv will only refer to the parameters used on command line or it can refer to the parameters send to any functions?
For example:
... TheFunction (warn, read, warnAgain, outPut, ask, write); ---
Can i say argc=7 and argv[0]=TheFunction, argv[1]=warn, argv[2]=read, etc?
no. If you want to use variable numbers of arguments have a look into the <stdarg.h> header and the "..." operator.
//Adam
Log in to post a comment.
argc and argv will only refer to the parameters used on command line or it can refer to the parameters send to any functions?
For example:
...
TheFunction (warn, read, warnAgain, outPut, ask, write);
---
Can i say argc=7 and argv[0]=TheFunction, argv[1]=warn, argv[2]=read, etc?
no.
If you want to use variable numbers of arguments have a look into the <stdarg.h> header and the "..." operator.
//Adam