#include <algorithm>
#include <iostream>
#include <vector>
bool IsOdd (int i) {
return ((i % 2) == 1);
}
int main(void)
{
std::vector<int> vec = {4, 6, 8, 2, 5, 10, 3, 1, 13};
std::vector<int>::iterator it = std::find_if(vec.begin(), vec.end(), IsOdd);
std::cout << "The first odd value is: " << *it;
}
/*
run:
The first odd value is: 5
*/