title: Expression must have (Pointer-to-) function type while using structs
body: <p>So basically what I'm doing is passing an array of structs from one function to another function. It works for the show functions, but not for the max functions :/ What exactly am i doing wrong?</p>
  
  <pre><code>void show( const ABC &amp; x ){
      cout&lt;&lt;"{"&lt;&lt;x.n&lt;&lt;",'"&lt;&lt;x.c&lt;&lt;"',{"&lt;&lt;x.a[0]&lt;&lt;","&lt;&lt;x.a[1]&lt;&lt;","&lt;&lt;x.a[2]&lt;&lt;"}}";
  }
  
  void show( const ABC arr[], unsigned elements ){
      for(unsigned i=0; i&lt;elements; i++)
          show(arr[i]);
  }
  </code></pre>
  
  <p>the following doesn't work</p>
  
  <pre><code>double max( const ABC &amp; x ){
      double max=x.a[2];
      if(x.a[1]&gt;max)
          max=x.a[1];
      if(x.a[0]&gt;max)
          max=x.a[0];
      return max;
  }
  
  double max( const ABC arr[], unsigned elements ){
      double max=arr[2].a[3];
      for(unsigned i=0; i&lt;elements; i++)
          if(max&lt;max(arr[i])){
              max=max(arr[i]);
          }
      return max;
  }
  </code></pre>