class Base
{
public:
virtual void setCoord(const size_t pos, const double val) = 0;
virtual ~Base(){};
};
class Terrain:public Base
{
std::array<double,3> coord;
public:
virtual void setCoord(const size_t pos, const double val) override
{
coord[pos] = val;
}
}
std::vector<std::unique_ptr<Base>> World;
World.emplace_back(new Terrain());