title: Error: initialization makes pointer from integer without a cast
body: <p>I have had trouble with this piece of code returning the error:</p>
  
  <pre><code>assgTest2.c: In function 'Integrate':
  assgTest2.c:12: warning: initialization makes pointer from integer without a cast
  assgTest2.c:15: error: expected ';' before ')' token
  </code></pre>
  
  <p>I've had a look around and haven't been able to make sense of the answer to similar questions, any help would be appreciated.</p>
  
  <pre><code>1    void SamplePoint(double *point, double *lo, double *hi, int dim)
  2    {
  3       int i = 0;
  4       for (i = 0; i &lt; dim; i++)
  5          point[i] = lo[i] + rand() * (hi[i] - lo[i]);
  6    }
  7
  8    double Integrate(double (*f)(double *, int), double *lo, double *hi, int dim, 
  9                     double N)
  10    {
  11       double * point = alloc_vector(dim);
  12       double sum = 0.0, sumsq = 0.0;
  13
  14       int i = 0;
  15       for (i = 0.0, i &lt; N; i++)
  16       {
  17         SamplePoint(point, lo, hi, dim);
  18
  19         double fx = f(point, dim);
  20         sum += fx;
  21         sumsq += fx * fx;
  22       }
  23
  24       double volume = 1.0;
  25       i = 0;
  26       for (i = 0; i &lt; dim; i++)
  27         volume *= (hi[i] - lo[i]);
  28
  29       free_vector(point, dim);
  30       return volume * sum / N;
  31    }
  </code></pre>
  
  <p>Edit: Fixed some mistakes, still giving the same error</p>