Good day everyone. I'm working on this Game of Life problem and trying to pass an array of boolean:(Given)
game({0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0}, 15, 9);
into the function below:(Given)
void game(bool cells[], int size, int num_gen)
However, I'm getting this error: Too many initializer values C/C++ (146)
I tried to play around and was able to pass in values by declaring the array in the main function:
int main(void)
{
int cells[]={0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0};
}
But this is my school assignment, so I'm not supposed to edit any given codes/inputs/functions.
I'm kinda lost now, will appreciate any inputs. Thanks in advance!