title: To write a program to remove duplicates from an array
body: <p>I am working on program that remove duplicates from an array I am using three functions here: one to take the input such as the size and the number, second function to remove duplicates and return the number without duplicates and the third function just a report show the size and the new number but I am having problem I don't know in what step I think in report or phillip erreur:</p>
  
  <blockquote>
    <p>In function <code>‘int main()’</code>: invalid conversion from <code>‘int*’</code> to <code>‘int’</code>,initializing argument 1 of <code>‘void report(int, int)’</code></p>
  </blockquote>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  const int size = 100;
  
  void phillip(int[], int &amp; );
  /* Preconditions: Array of base type in declared and int varuable declared
     postconditions: the array is filled with values supllied by the user at
     the keybord. the user is assked how many values they want - this value is
     given to the second argument.
  */
  
  int remdubs(int[], int noel);
  /* Preconditions: An array of basetype int that  has noel values.
     postconditions: The number of unique elemts in the array is returned. The function removes all dubplicates inside the array.
  */
  
  void report(int s, int d);
  
  int main()
  {
      int ruby[size];
      int numele, numuniq;
  
      phillip(ruby, numele);
  
      numuniq = remdubs(ruby, numele);
  
      report(ruby, numuniq);
  
      return 0;
  }
  
  void phillip(int[], int&amp; )
  {
      int s;
      cout &lt;&lt; "\nHow many values you want? ";
      cin &gt;&gt; s;
  
      cout &lt;&lt; "\nPlease input 10 integers, hitting return after each one \n";
      for (int i = 0; i &lt; s; i++)
      {
          int num;
          cin &gt;&gt; num;
      }
  }
  
  int rembups(int sapphire[], int noel)
  {
      for (int i = 0; i &lt; noel; i++)
      {
          for (int j = i + 1; j &lt; noel; j++)
          {
  
              if (sapphire[i] == sapphire[j])
              {
                  for (int k = j; k &lt; noel; k++)
                      sapphire[k] = sapphire[k + 1];
  
                  noel--;
  
                  j--;
              }
          }
      }
      return noel;
  }
  
  void report(int s, int d)
  {
      cout &lt;&lt; "\nYou entered " &lt;&lt; s &lt;&lt; "distinct numbers: " &lt;&lt; d;
  }
  </code></pre>