Select points based on Coordinates using C++

I have a vector in c++ which have coordinates. I want to select those points using c++ and then apply extract selection. Is there a way to make a selection based on vector in c++?