I have a class which holds a 2D array as a member.
int neighbourhood[30][5];
And a class member function that needs to copy a incoming array;
template <typename TwoDArray>
void set_neighbourhood(TwoDArray& nbh)
{
neighbourhood = nbh;
}
As evident from the code, a template type is in place. Why use templates? Well passing 2D arrays seems to easy and clean according to the answer here
But I am getting a L-value error and seems that this is not the right syntax to copy the array.
Definitely I am missing something.