title: Invalid Operands to binary Expression, C
body: <p>Im working on a function that takes some values and finds the min, max, and average of the values. I'm passing everything to the function by reference and am getting some errors when I try and do basic operations like <code>+</code> and <code>/</code> Namely the error is</p>
  
  <blockquote>
    <p>Invalid operands to binary expression ('double *' and 'double *')</p>
  </blockquote>
  
  <pre><code>void MinMaxAvg(double *pA, double *min, double *max, double *avg, int lines, double *total )
  {
      for (int i=0; i&lt;lines; i++)
      {
          if ( i==0)
          {
              min = &amp;pA[0];
              max = &amp;pA[0];
          }
          else
          {
              if (&amp;pA[i] &lt; min)
              {
                  min = &amp;pA[i];
              }
  
              if (&amp;pA[i] &gt; max)
              {
                  max = &amp;pA[i];
              }
          }
  
          total += &amp;pA[i];     //&lt;-- Errors on this line
  
      }
  
      avg = (total / lines);         // &lt;-- Errors on this line.
  
  }
  </code></pre>