title: error: invalid type argument of unary '*'
body: <p>I don't understand these errors can someone explain?</p>
  
  <p>error: invalid type argument of unary '<em>' (have 'double')
  error: invalid type argument of unary '</em>' (have 'double')
  error: invalid type argument of unary '*' (have 'double')</p>
  
  <pre><code>    double getMedian(double *array, int *hours){
      if (*hours &lt;= 0) return 0;
      if (*hours % 2) return (float)*array[(*hours + 1) / 2];
      else{int pos = *hours / 2;
      return (float)(*array[pos] + *array[pos + 1]) / 2;}}
  </code></pre>