bool isEqual(const std::pair<std::string, int>& element) { return element.first == User.name; } it = std::find_if( sortList.begin(), sortList.end(), isEqual );