#include #include using namespace std; class point{ float a, b; public: point(){ this->a=0; this->b=0; } point(float a, float b){ this->a=a; this->b=b; } float getA() const { return this->a; } float getB() const { return this->b; } }; vector f(const vector &vec, const point &a, const point &b) { vector vec2; for(const point &p : vec) { if(p.getA()>=a.getA() && p.getA() <=b.getA() && p.getB()>=b.getB() && p.getB() <= a.getB()) { vec2.push_back(p); } } return vec2; } int main() { vector vec(10); for(int i=0; i<10; i++) { vec[i]=point(i,i); } point a(2,6); point b(5,3); vector p = f(vec, point(2,6), point(5,3)); for(const point &pp : p) { cout<