Does your compiler have getopt() ? It's a useful function for accessing command line args. If you don't have it, you may be able to find the source on the web. (There are examples of its use on the forums here)

Alternatively, check each command line options manually yourself. It's best to adopt an approach that means invoking your program something like this:

>myprog.exe -aONE -bTWO -c

then you can go:

>myprog.exe -aONE -c