title: Redefinition of 'i' error
body: <p>So I have the following C code:</p>
  
  <pre><code>for (int i = 0; i &lt; nWallSegments; i+=4) {
    fscanf(fin, "%le %le %le %le", &amp;wallSegments[i+0], &amp;wallSegments[i+1], &amp;wallSegments[i+2], &amp;wallSegments[i+3]);
  }
  
  for (int i = 0; i &lt; nWallSegments; i+=4) {
    nWallPoints += ceil(dist(wallSegments[i+0], wallSegments[i+1], wallSegments[i+2], wallSegments[i+3]) / dWallPoints) - 2;
    // other stuff here
  }
  </code></pre>
  
  <p>When I try to compile, I get the following error. Coming from a Python background, I have no idea what is going on. I have searched online for the answer but with no luck.</p>
  
  <pre><code>Prog.c:44:12: error: redefinition of 'i'
    for (int i = 0; i &lt; nWallSegments; i+=4) {
             ^
  Prog.c:40:12: note: previous definition is here
    for (int i = 0; i &lt; nWallSegments; i+=4) {c
  </code></pre>