search in vector of pairs c++
bool isEqual(const std::pair<std::string, int>& element) { return element.first == User.name; } it = std::find_if( sortList.begin(), sortList.end(), isEqual );
Source: stackoverflow.com
find an element in vector of pair c++
auto index = std::distance(dict.begin(), std::find_if(dict.begin(), dict.end(), [&](const auto& pair) { return pair.first == movieName; }));
Source: stackoverflow.com
search in vector of pairs c++
auto it = std::find_if( sortList.begin(), sortList.end(), [&User](const std::pair<std::string, int>& element){ return element.first == User.name;} );
Source: stackoverflow.com