title: How to efficiently extract unique values from array?
body: <p>I would like to extract unique values from my (dynamically allocated) array. I have something like this :</p>
  
  <pre><code>    [0]     0   int
      [1]     1   int
      [2]     2   int
      [3]     2   int
      [4]     2   int
      [5]     5   int
      [6]     6   int
      [7]     6   int
      [8]     8   int
      [9]     9   int
      [10]    10  int
      [11]    8   int
      [12]    12  int
      [13]    10  int
      [14]    14  int
      [15]    6   int
      [16]    2   int
      [17]    17  int
      [18]    10  int
      [19]    5   int
      [20]    5   int
  </code></pre>
  
  <p>I would like to have array of size 12 with every record in it being unique value form the other array.</p>
  
  <p>How can I do that ? </p>
  
  <p><strong>EDIT</strong>
  I forgot to mention that I cannot use STL containers (like <code>std::vector</code> or <code>std::list</code>)</p>