Answers for "c++ vector quick search"

C++
0

c++ vector quick search

for ( auto iter = serverList.begin();
        iter != serverList.end();
        ++ iter ) {
    if ( std::search( iter->begin(), iter->end(),
                      index.begin(), index.end() ) != iter->end() ) {
        indexResult.push_back( iter - serverList.begin() );
    }
}
Posted by: Guest on March-11-2021

Browse Popular Code Answers by Language