#include <iostream>
#include <vector>

struct Location 
{
    Location(int x, int y)
    : x(x)
    , y(y)
    {
        std::cout << "ctor" << std::endl;
    }

    Location(const Location & other)
    : x(other.x)
    , y(other.y)
    {
        std::cout << "copy ctor" << std::endl;
    }

    int x;
    int y;
};

int main ()
{
    // local objects 
    Location locs[3]{ {1, 2}, {3, 4}, {5, 6} };
    
    // code that updates locs[0], locs[1], locs[2] ...

    // construct vector 
    std::vector<Location> pointsVec {locs, locs+3};

    return 0;
}