title: invalid conversion from 'int' to 'int*' [-fpermissive] on passing array
body: <p>I am new to C++ language and I have no idea of pointers and their usage. I'm facing the error <code>"[Error] invalid conversion from 'int' to 'int*' [-fpermissive]"</code> while compiling in line:</p>
  
  <pre class="lang-c prettyprint-override"><code>cout &lt;&lt; midd (ax [10], asize) &lt;&lt; endl;
  </code></pre>
  
  <p>This is the code:</p>
  
  <pre class="lang-c prettyprint-override"><code>#include &lt;iostream&gt;
  
  using namespace std;
  double midd(int arr[10], int size);
  
  int main() {
      int ax[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
      int asize = 10;
      cout &lt;&lt; midd(ax[10], asize) &lt;&lt; endl;
  }
  
  double midd(int arr[10], int size) {
      int acount = 0;
      int mid1;
      int mid2;
      int amid = size / 2;
  
      double mid = 0.0;
  
      while (acount &lt; 10) {
          if (acount == amid) {
              mid1 = arr[acount];
          }
          else if (acount == (mid + 1)) {
              mid2 = arr[acount];
          }
          ++acount;
      }    
      mid = (mid1 + mid2) / 2.0;
      return mid;
  }
  </code></pre>