I would like to extract unique values from my (dynamically allocated) array. I have something like this :
[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
I would like to have array of size 12 with every record in it being unique value form the other array.
How can I do that ?
EDIT
I forgot to mention that I cannot use STL containers (like std::vector or std::list)