title: create array of pointers to files
body: <p>How would I go about making an array of file pointers in C?<br>
  I would like to create an array of file pointers to the arguments of main... like a1.txt, a2.txt, etc... So I would run <code>./prog arg1.txt arg2.txt arg3.txt</code>to have the program use these files.<br>
  Then the argument for main is <code>char **argv</code></p>
  
  <p>From argv, I would like to create the array of files/file pointers. This is what I have so far.</p>
  
  <pre><code>FILE *inputFiles[argc - 1];
  int i;
  for (i = 1; i &lt; argc; i++)
      inputFiles[i] = fopen(argv[i], "r");
  </code></pre>