int a[5] = {5,2,3,2,4}
If i have an array like this, i want to get uniques
Not
5,2,3,4
but
5,3,4
Any number repeated will be removed.
I have tried using std::<set>
const size_t len = sizeof(a) / sizeof(a[0]);
std::set<int> s(a, a + len);
However, it does not work as it will produce uniques:
5,2,3,4