how to correctly initialize std::array with a custom struct in C++11
I'm converting an old project and This might be a silly question, but I'm trying to create a `std::array` of a custom struct in C++11, but I'm running into issues with initialization... My struct `Point` has two member variables, `x` and `y`, both of type `int`. Here's what my struct looks like: ```cpp struct Point { int x; int y; Point(int xVal, int yVal) : x(xVal), y(yVal) {} }; ``` Next, I am attempting to initialize a `std::array<Point, 3>` like this: ```cpp #include <array> #include <iostream> int main() { std::array<Point, 3> points = {{Point(1, 2), Point(3, 4), Point(5, 6)}}; for (const auto& point : points) { std::cout << "Point: (" << point.x << ", " << point.y << ")\n"; } return 0; } ``` However, when I compile this code, I receive the following behavior: ``` behavior: no matching constructor for initialization of 'Point' ``` I’ve tried different ways to initialize the `std::array`, including using `std::make_array` (which I know is not available in C++11) and changing the brace initialization to parentheses, but nothing seems to work. I suspect it might have to do with the way I’m initializing the `std::array`, but I'm not sure. Any help on how to correctly initialize this array of points would be greatly appreciated! My development environment is Windows. What am I doing wrong? My development environment is Ubuntu 20.04. I'd be grateful for any help. I'm developing on CentOS with C++.