Suppose i have the following code:
std::vector< std::pair <int, char> > myVec;
or
std::list< std::pair <int, char> > myList;
/* then ***************/
std::list< std::pair <int, char> >::iterator listIt;
or
std::vector< std::pair <int, char> >::iterator vectorIt;
/* No difference between vector and list */
Now i need to search just for one int
element in them, So:
vectorIt = std::find_if(myVec.begin(),myVect.end(),make_pair(.....));
^^^^^^^^^^^^^^^^^
how can i do it?
See Question&Answers more detail:os