PS
Size: a a a
PS
M
RB
PS
PS
M
RB
M
Unknown topic.
Do you mean one of these topics maybe?
* sensors 77
* tsort 73
* meteor 67
RB
M
/*
* c++ - How to find out if an item is present in a std::vector ...
*
* You can use std::find
* (http:en.cppreference.com/w/cpp/algorithm/find) from <algorithm>:
*/
std::find(vector.begin(), vector.end(), item) != vector.end()
/*
* This returns a bool (true if present, false otherwise). With your
* example:
*/
#include <algorithm>
if ( std::find(vector.begin(), vector.end(), item) != vector.end() )
do_this();
else
do_that();
// [MSN] [so/q/571394] [cc by-sa 3.0]
PS
M
Р
Р
M
Р
M
PS
M