Possible Duplicate:
Remove duplicates from array
I have an int array which contains a defined number of elements, all positive. I want to get an array from this one where all the elements appear only once. e.g. If the first array was something like {2000,2011,2011,2012,2009,2009,2000}
, I want to get this {2000,2011,2012,2009}
. How can I do this? I tried lots of things with for loops but I can't manage to do something good.