Hey,
How do you read from the command line in C? I need to read 10 arguments from the command line. Can I use char* argv[] as a parameter in the main function to do so?
Thanks.
You can use that or
int main(int argc, char** argv)
where argc is the number of command-line parameters and argv is an array containing pointers to the parameters.
argv[0] is the program name itself.
Reputation Points: 290
Solved Threads: 277
Posting Virtuoso
Offline 1,688 posts
since Oct 2009