mardi 9 août 2016

How to keep only duplicates on a STL vector<string>?

Given an STL vector, output only duplicates:

INPUT {"A","A","B","B","C","D","E","F"};
OUTPUT {"A","B"}

I'm really a novice in stl so don't know where to start. Can someone point me in the right direction?

Aucun commentaire:

Enregistrer un commentaire