bool a[5][5] {{true, true, true, true, true},
{true, true, true, true, true},
{true, true, true, true, true},
{true, true, true, true, true},
{true, true, true, true, true}};
Correct, but fragile - if you resize the array without changing the part, the true, true, true...added part of the array will be initialized with false.
Better to just use for a loop:
bool a[5][5];
for (auto& r: a)
for (bool& b: r)
b = true;
or use std::vector:
std::vector<std::vector<bool> > a(5, {true, true, true, true, true});