title: Executing a procedure with conversion error
body: <pre><code>#include&lt;iostream&gt;
  using namespace std;
  
  void MinMax(int tab[],int* min, int&amp; max)
  {
      int size=0;
      for(int i=0; i&lt;4095; i++)
      {
          if(tab[i]==-1) break;
          size++;
      }
      size=(int)size;
      for(int passes=0; passes&lt;size; passes++)
      {
          if(tab[passes]&lt;tab[passes+1])
          {
              swap(tab[passes],tab[passes+1]);
          };
      }
      min=tab[size];
      cout&lt;&lt;min&lt;&lt;" ";
      for(int passes=0; passes&lt;size; passes++)
      {
          if(tab[passes]&gt;tab[passes+1])
          {
              swap(tab[passes],tab[passes+1]);
          };
      }
      max=tab[size];
      cout&lt;&lt;max&lt;&lt;" ";
  
  }
  int main()
  {
      int z1[]= {10,2,5,7,4,-1};
      int min, max;
      MinMax(z1,min,max);
      for(int i=0; i&lt;7; i++)
      {
          cout&lt;&lt;z1[i]&lt;&lt;" ";
      }
  }
  
  </code></pre>
  
  <p>I need to write some values in z1 in main function, then execute MinMax. It should find smallest and biggest value from an array. The first problem is when i try to compile it, there is en error about converting int to int* and i can't assign tab[size] to min. I should also use 2 intigers when executing MinMax, but it doesn't work.</p>