lundi 30 novembre 2015

How to get identical pairs from two vectors in c++

I define two vectors : vector > vec1 & vec2.
I want to find same pairs from vec1 and vec2. For example, vec1 = [(1,2),(1,9), (2,13), (3,5)] vec2 = [(8, 7), (4,2),(2,10) ,(1,9)]. Then the result should be [(1,9)]. Thanks.

Aucun commentaire:

Enregistrer un commentaire