#include #include using namespace std; class Point { public: int x, y; Point(int givenX, int givenY) { this -> x = givenX; this -> y = givenY; } }; int main() { vector v; for(int i =0;i<10;++i) v.push_back(new Point(i,i+2)); for (Point* x : v) cout<x<<" "<y<