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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…