search in vector of pairs c 2b 2b

Solutions on MaxInterview for search in vector of pairs c 2b 2b by the best coders in the world

showing results for - "search in vector of pairs c 2b 2b"
Facundo
25 Apr 2019
1bool isEqual(const std::pair<std::string, int>& element)
2{
3    return element.first ==  User.name;
4}
5it = std::find_if( sortList.begin(), sortList.end(), isEqual );
6
Marco
04 Mar 2020
1auto it = std::find_if( sortList.begin(), sortList.end(),
2    [&User](const std::pair<std::string, int>& element){ return element.first == User.name;} );
3