Close!

I need to be able to manipulate the contents of the 2D array within the function.
that is the purpose of the function. sry, I should have mentioned that sooner.

as far I I know, this style of for loop only allows iteration
for (const auto& e : arr_elements)
for (const auto& v : e)
std::cout << v << ' ';