Variable comparison

I'm looking to examine a series of differing integer results and discard any results that don't appear more at least 3 times. and then obviously I need to collect values of the integers that passed the test. Any advice ??
Put them in an vector, go through the vector, keep track of how many times each value appears, when you're done go through the vector again and throw away all the ones that didn't come up at least three times.
closed account (3qX21hU5)
Really could use more info. Like what you need help with... where your stuck at... ect.
A map<int,int> might be easier than a vector.
A map makes sure the keys are unique and the value can be used to count the number of times each key is encountered.
Topic archived. No new replies allowed.