Multiple command line arguments with switches
Is it possible to have more than just one type of command line arguments? What I mean by that is, for example: If I wanted to make a program that replaces words in some files, input in command line would look something like this:
Code:
replace -f [file1.txt, file2.txt, file3.txt] -w [ten, twenty] -n [10, 20]
"replace" is the name of a program, "-f" would represent file name parameters , "-w" would represent words that need to be replaced, "-n" would represent words with which "-w" parameters were to be replaced.
I now that for just one set of parameters I can use:
Code:
int main(int argc, char *argv[])
But what if I want to differentiate few kinds of parameters by adding switches?