I want to initialize a two-dimensional array of variable size to zero. I know it can be done for a fixed-sized array:
int myarray[10][10] = {0};
but it is not working if I do this:
int i = 10;
int j = 10;
int myarray[i][j] = {0};
Is there a one-line way of doing this or do I have to loop over each member of the array?
Thanks