#include <iostream>
#include <list>
int main()
{
std::list<int> lst;
for (int i = 10; i <= 30; i += 2) {
lst.push_back(i);
}
auto indexvalue16 = find(lst.begin(), lst.end(), 16);
if (lst.end() == indexvalue16)
{
std::cout << "item not found" << std::endl;
}
else
{
std::cout << "item found" << std::endl;
}
return 0;
}
/*
run:
item found
*/