Answers for "check if string in vector c++"

C++
12

if vector contains value c++

#include <algorithm>

if(std::find(v.begin(), v.end(), x) != v.end()) {
    /* v contains x */
} else {
    /* v does not contain x */
}
Posted by: Guest on January-17-2020
0

check if string in vector c++

match sub string
Posted by: Guest on July-23-2021

Browse Popular Code Answers by Language