I wanted to know if it is possible to initialize a bunch of classes within an array of vectors within a single "line".
class A {
public:
A(int k) {...}
};
[...]
#include <array>
#include <vector>
using namespace std;
array<vector<A>, 3> = { { A(5), A(6) }, { A(1), A(2), A(3) }, { } };
As you can imagine this solution doesn't work (otherwise I wouldn't be here!). What is the fastest way to do it?