title: Variable length and position command line arguments
body: <p>So, quick question:
  I am tasked with making a program that reads in a file, does some fancy things, and writes out to an html file with the re-purposed text, all simple stuff.
  Furthermore the program must be able to accept up to four command line arguments (but a minumum of two). The executable of course, the file it is reading in, the file name it will be reading out to, and finally a "-r" argument for more information on the file (the amount of paragraphs, etc).</p>
  
  <p>So the question I have is as follows:
  the "-r" argument can be anywhere in the arguments (as long as it comes after argv[0] of course), or it can be completely non-existent (as can the output file name).</p>
  
  <p>This is still simple to do, a little tedious writing a bunch of if's or even a switch or two, but I can't help but think that there may be an easier way to accomplish this, rather than having a plethora of if statements.</p>
  
  <p>Any help would be greatly appreciated. (I also suppose you don't need any code considering I don't exactly have a problem.)</p>