Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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 by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #find #element #vector #pair
ADD COMMENT
Topic
Name
1+2 =