title: Can't compile C program using Windows 7 command prompt and MinGW
body: <p>I am having a really tough time trying to compile this code running command prompt in Windows 7 using MinGW:</p>
  <pre><code>#include &lt;stdio.h&gt;
  
  int main(void) 
  {
  
      int num;
      num = 1;
  
      printf (&quot;I am a simple &quot;);
      printf (&quot;computer. \n&quot;);
      printf (&quot;My favorite number is %d because it is first. \n&quot;, num);
  
        
      return 0;
  }
  </code></pre>
  <p>I run command prompt as administrator. I set the user path environmental variable (not the system path variable) to the local MinGW. I place first.c (this above source code) into C: directory.  I've tried the following commands with directory set to C:</p>
  <pre><code>gcc first.c
  
  gcc C:/first.c
  </code></pre>
  <p>but get:</p>
  <blockquote>
  <p>gcc: error:  first.c: No such file or directory</p>
  <p>gcc: fatal error: no input files</p>
  <p>compilation terminated</p>
  </blockquote>
  <p>I'm not sure what I'm doing wrong. I've tried troubleshooting quite a bit using previous Stackoverflow questions and elsewhere, but just can't seem to get it.</p>