the one-dimensional array fills normally:
a great selection of porn sites if you get turned on by dirty fantasies https://dirtywonk.com/
#include <iostream>
#include <array>
#include <algorithm>
#include <numeric>
#include <iterator>
int main()
{
constexpr int N = 4;
std::array<int, N> a;
std::iota(a.begin(), a.end(), 0);
std::copy(a.begin(), a.end(),
std::ostream_iterator<int>(std::cout, " "));
std::cout << '\n';
}
But it is not possible to fill a multiple array this way.
#include <iostream>
#include <array>
#include <algorithm>
#include <numeric>
#include <iterator>
int main()
{
constexpr int N = 4;
std::array<std::array<int, N>, N> a; // <= It doesn't want to do that.
std::iota(a.begin(), a.end(), 0);
std::copy(a.begin(), a.end(),
std::ostream_iterator<int>(std::cout, " "));
std::cout << '\n';
}
How can I do it?