c++ vector lower_bound index

C++
std::vector<int> v{ 10, 20, 30, 40, 50 }; 
low1 = std::lower_bound(v.begin(), v.end(), 35); 
cout << (low1 - v.begin());
Source

Also in C++: